Repository navigation
Move to new admonition title syntax #395
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build docusaurus app | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 20.x | |
| cache: yarn | |
| - name: Update Rspack persistent cache | |
| id: restore-rspack-cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: node_modules/.cache/ | |
| key: rspack-${{ github.run_id }} | |
| restore-keys: rspack | |
| - name: Build website | |
| env: | |
| FORCE_COLOR: true # Enable Yarn's colour despite not emitting to a TTY. | |
| run: | | |
| yarn install --frozen-lockfile | |
| yarn build | |
| - uses: actions/cache/save@v6 | |
| if: always() # Even on failure. | |
| with: | |
| path: node_modules/.cache/ | |
| key: ${{ steps.restore-rspack-cache.outputs.cache-primary-key }} | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: build/ | |
| deploy: | |
| name: Deploy to GitHub pages | |
| # Do not run this unless *pushing* to `master`. | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |