Navigation changes to improve engagement #19
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
| # Sample workflow for building and deploying a VitePress site to GitHub Pages | |
| # | |
| name: Deploy VitePress site to Pages | |
| on: | |
| # Runs on pushes targeting the `main` branch. | |
| push: | |
| branches: [main] | |
| # Allows manual runs | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Install dependencies | |
| run: | | |
| cd docs | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| - name: Build with VitePress | |
| run: | | |
| cd docs | |
| rm -rf .vitepress/cache node_modules/.vite | |
| npm run docs:build -- --force | |
| # GitHub Pages needs this file to correctly serve project sites | |
| - name: Add GitHub Pages config | |
| run: | | |
| touch docs/.vitepress/dist/.github-pages | |
| # Disable Jekyll so GitHub Pages serves VitePress output as-is | |
| - name: Disable Jekyll | |
| run: touch docs/.vitepress/dist/.nojekyll | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| name: github-pages | |
| path: docs/.vitepress/dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| name: Deploy | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: github-pages | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |