feat: add a build workflow in GitHub Actions #1
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 Documentation | |
| on: | |
| push: | |
| branches: | |
| - main # or whichever branch you want to trigger on | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js & pnpm | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: | | |
| corepack enable | |
| pnpm install | |
| - name: Build docs | |
| run: pnpm build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: build/ |