Netlify deploy script

This commit is contained in:
Jan Dvorak
2021-10-12 11:10:27 +02:00
parent b67c22c17a
commit 5a99c07cc7

View File

@@ -20,12 +20,66 @@ jobs:
node-version: 12.x
- run: npm ci
- run: npm build
deploy:
preview:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs/
needs: [test]
needs: [ test ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Build the Guide
run: npm ci && npm run build
- name: Deploy to Netlify for preview
uses: nwtgck/actions-netlify@v1.2.2
with:
publish-dir: './docs/public'
production-branch: devel
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
netlify-config-path: './docs/netlify.toml'
alias: ${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GUIDE_SITE_ID }}
deploy-branch:
runs-on: ubuntu-latest
defaults:
run:
working-directory: guide/site/
needs: [ test ]
if:
contains('
refs/heads/release-
', github.ref)
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Build the Guide
run: npm ci && npm run build
- name: Deploy to Netlify for preview
uses: nwtgck/actions-netlify@v1.2.2
with:
publish-dir: './docs/public'
production-branch: devel
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
netlify-config-path: './docs/netlify.toml'
alias: ${{ github.head_ref }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GUIDE_SITE_ID }}
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: guide/site/
needs: [ test ]
if:
contains('
refs/heads/devel
@@ -36,14 +90,16 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Deploy to Netlify
- name: Build the Guide
run: npm ci && npm run build
- name: Deploy to Netlify for preview
uses: nwtgck/actions-netlify@v1.2.2
with:
publish-dir: './dist'
publish-dir: './docs/public'
production-branch: devel
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
netlify-config-path: './netlify.toml'
netlify-config-path: './docs/netlify.toml'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DOCS_SITE_ID }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GUIDE_SITE_ID }}