docs(stdlib): regenerate API reference #16
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: Build and deploy site | |
| # Builds and verifies every pull request. Pushes to master are additionally | |
| # deployed to GitHub Pages. PR builds are retained as downloadable preview | |
| # artifacts so proposed changes can be tested locally before merging. | |
| # | |
| # Requires repo Settings -> Pages -> "Build and deployment" -> Source = "GitHub Actions". | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| JEKYLL_ENV: production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Verify vendored frontend assets | |
| run: | | |
| npm run vendor:frontend | |
| git diff --exit-code -- assets/plugins | |
| - name: Build site | |
| run: bundle exec jekyll build | |
| - name: Verify built dependency assets | |
| run: npm test | |
| - name: Generate Pagefind search index | |
| run: npx -y pagefind@1.5.2 --site _site | |
| - name: Verify search index exists | |
| run: test -f _site/pagefind/pagefind.js && test -f _site/pagefind/pagefind-entry.json | |
| - name: Upload Pages artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: _site | |
| - name: Upload PR preview | |
| if: github.event_name == 'pull_request' | |
| id: preview | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: site-preview-pr-${{ github.event.pull_request.number }} | |
| path: _site | |
| retention-days: 7 | |
| - name: Add PR preview instructions | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| { | |
| echo "### Site preview" | |
| echo | |
| echo "Download [site-preview-pr-${{ github.event.pull_request.number }}](${{ steps.preview.outputs.artifact-url }}), extract it, then serve the directory locally:" | |
| echo | |
| echo '```shell' | |
| echo 'python -m http.server 4000' | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |