Release GitHub Page #9
Workflow file for this run
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: Release GitHub Page | |
| # Based on https://vitepress.dev/guide/deploy#github-pages | |
| # Enables automatic publishing of the website to GitHub Pages from main branch. | |
| on: | |
| # Runs on pushes targeting the `main` branch. Change this to `master` if you're | |
| # using the `master` branch as the default branch. | |
| # push: | |
| # branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab for debugging purposes | |
| workflow_dispatch: | |
| release: | |
| types: | |
| - released | |
| # 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 job | |
| build: | |
| name: Build | |
| # Specify runner + deployment step | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the branch | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| # Fix "Corepack must currently be enabled by running corepack enable in your terminal." | |
| - name: Enable Corepack | |
| run: corepack enable | |
| # Setup Node.js with yarn support | |
| - name: Setup Node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 | |
| with: | |
| node-version: "lts/*" # Ensures the latest LTS version is used | |
| cache: yarn # npm / pnpm / yarn | |
| # Configure GitHub Pages | |
| - name: Setup Pages | |
| uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b | |
| # Install javascript dependencies with yarn | |
| - name: Install dependencies | |
| run: yarn install # or pnpm install / yarn install / bun install | |
| # Build the website | |
| - name: Build with VitePress | |
| run: yarn run build # or pnpm docs:build / yarn docs:build / bun run docs:build | |
| # Upload the artefact to GitHub Pages | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b | |
| with: | |
| path: web/.vitepress/dist | |
| # Deployment job | |
| deploy: | |
| # Execute deployment only from master branch | |
| if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| # Add a dependency to the build job | |
| needs: build | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e |