fix: 🐛 update deploy workflow and script for Docusaurus site deployment #3
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 Docs | |
| on: | |
| push: | |
| branches: ["main"] | |
| # Branch-based Pages deployment via `docusaurus deploy` | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Required to push to gh-pages | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| - run: pnpm install --frozen-lockfile | |
| - name: Configure git identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy with Docusaurus | |
| env: | |
| GIT_USER: github-actions[bot] | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: pnpm --filter "@gracefullight/docusaurus-plugin-docs" run deploy |