Files
meteor/.github/workflows/docs.yml
2021-10-12 11:10:27 +02:00

106 lines
2.9 KiB
YAML

name: Meteor Docs
on:
push:
paths:
- 'docs/**/*'
pull_request:
paths:
- 'docs/**/*'
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs/
steps:
- uses: actions/checkout@v2
- name: Test build
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm ci
- run: npm build
preview:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs/
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
refs/heads/master
', 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'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GUIDE_SITE_ID }}