github-pages #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github-pages | |
on: | |
push: | |
branches: | |
- master | |
workflow_run: | |
workflows: [run-cron] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies and build | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- run: npm ci | |
- run: npm run build | |
- name: Check GitHub Pages status | |
uses: crazy-max/ghaction-github-status@v3 | |
with: | |
pages_threshold: major_outage | |
- name: Deploy to gh-pages branch | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |