feat(docs): rebuild whitepaper pages #25
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
| # GitHub Pages Deployment | |
| # Builds and deploys the public documentation portal using VitePress. | |
| name: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [master] | |
| paths: &pages_paths | |
| - 'CHANGELOG.md' | |
| - 'CONTRIBUTING.md' | |
| - 'docs/**' | |
| - '.github/workflows/pages.yml' | |
| pull_request: | |
| branches: [master] | |
| paths: *pages_paths | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install dependencies | |
| working-directory: docs | |
| run: npm ci | |
| - name: Run docs checks | |
| working-directory: docs | |
| run: npm run test | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Set VitePress base | |
| shell: bash | |
| env: | |
| BASE_PATH: ${{ steps.pages.outputs.base_path }} | |
| run: | | |
| set -euo pipefail | |
| if [[ -z "${BASE_PATH}" ]]; then | |
| base="/" | |
| else | |
| base="${BASE_PATH%/}/" | |
| fi | |
| echo "VITEPRESS_BASE=${base}" >> "$GITHUB_ENV" | |
| - name: Build with VitePress | |
| working-directory: docs | |
| env: | |
| VITEPRESS_BASE: ${{ env.VITEPRESS_BASE }} | |
| run: npm run build | |
| - name: Add .nojekyll | |
| working-directory: docs | |
| run: touch .vitepress/dist/.nojekyll | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| permissions: | |
| pages: write | |
| id-token: write | |
| 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@v4 |