Deploy Docusaurus to GitHub Pages #899
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: Deploy Docusaurus to GitHub Pages | |
on: | |
push: | |
branches: [main] | |
# enables runs every day at midnight UTC | |
schedule: | |
- cron: "0 0 * * *" | |
# enables manual runs | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 # $GITHUB_WORKSPACE | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".tool-versions" | |
cache: "yarn" | |
- name: Install yarn | |
run: npm install yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build the Docusaurus app | |
run: yarn build | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: docusaurus # the branch for the deployment | |
folder: build # the folder getting deployed |