Build and deploy on GitHub pages #625
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: Build and deploy on GitHub pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "* 1 * * *" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: | | |
npm i -g yarn | |
yarn install --frozen-lockfile | |
- name: Build | |
env: | |
CALENDAR_API_KEY: ${{ secrets.CALENDAR_API_KEY }} | |
run: yarn docusaurus build | |
- name: Deploy to GitHub pages | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
CALENDAR_API_KEY: ${{ secrets.CALENDAR_API_KEY }} | |
BRANCH: gh-pages | |
FOLDER: build | |
TARGET_FOLDER: docs | |
CLEAN: true |