github pages workflow update #4
This file contains hidden or 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 website to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # or your default branch | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: website | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required for docusaurus to push to gh-pages | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build website | |
run: npm run build | |
- name: Configure Git | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- name: Deploy to GitHub Pages | |
env: | |
GIT_USER: github-actions[bot] | |
GIT_PASS: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npx docusaurus deploy |