doc fixes #3
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 the Jekyll site, generates the Pagefind search index from the *built* | |
| # site, and deploys the result to GitHub Pages. Because the index is generated | |
| # here on every deploy, it can never drift out of sync with the content (which | |
| # is what happened when the index was hand-committed into the repo). | |
| # | |
| # Requires repo Settings -> Pages -> "Build and deployment" -> Source = "GitHub Actions". | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow one in-flight deploy at a time; let a running deploy finish rather than | |
| # cancelling it (cancelling a half-published deploy can leave Pages inconsistent). | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| JEKYLL_ENV: production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - 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@v4 | |
| with: | |
| node-version: "20" | |
| - name: Build site | |
| run: bundle exec jekyll build | |
| - 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 | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |