| 1 | name: Deploy to GitHub Pages |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | |
| 8 | jobs: |
| 9 | deploy: |
| 10 | name: Deploy to GitHub Pages |
| 11 | runs-on: ubuntu-latest |
| 12 | steps: |
| 13 | - uses: actions/checkout@v2 |
| 14 | - uses: actions/setup-node@v3 |
| 15 | with: |
| 16 | node-version: 18.x |
| 17 | |
| 18 | - name: Setup Pnpm |
| 19 | run: sudo corepack enable |
| 20 | - name: Install dependencies |
| 21 | run: pnpm install |
| 22 | - name: Build website |
| 23 | run: pnpm build |
| 24 | - name: Deploy to GitHub Pages |
| 25 | uses: peaceiris/actions-gh-pages@v3 |
| 26 | with: |
| 27 | github_token: ${{ secrets.TOKEN }} |
| 28 | publish_dir: ./out |
| 29 | user_name: github-actions[bot] |
| 30 | user_email: 41898282+github-actions[bot]@users.noreply.github.com |