Add Jekyll GitHub Pages deployment workflow#336
Conversation
Co-authored-by: paulthanson082-glitch <252514830+paulthanson082-glitch@users.noreply.github.com> Agent-Logs-Url: https://github.com/paulthanson082-glitch/friendly-outlaw/sessions/7d1592c7-2347-4d11-b520-9d7c5865ff1f
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a GitHub Actions workflow to build a Jekyll site and deploy it to GitHub Pages on pushes to main or manual dispatch.
Changes:
- Introduces a two-job GitHub Pages pipeline:
build(Jekyll build + artifact upload) anddeploy(Pages deployment). - Configures token permissions required for Pages deployment.
- Adds concurrency control to prevent overlapping deployments.
| # 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. |
There was a problem hiding this comment.
The comment is inaccurate: with cancel-in-progress: false, runs are serialized (queued) but not 'skipped'. Either adjust the comment to reflect queuing behavior, or (if the intent is to skip intermediate queued runs) set cancel-in-progress: true and update the text accordingly.
| # 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. | |
| # Allow only one concurrent deployment; additional runs are queued and executed serially. | |
| # Do NOT cancel in-progress runs, as we want to allow these production deployments to complete. |
| name: Deploy Jekyll with GitHub Pages dependencies preinstalled | ||
|
|
||
| on: | ||
| # Runs on pushes targeting the default branch |
There was a problem hiding this comment.
The workflow is hard-coded to main, but the comment says 'default branch'. If main is the intended branch, update the comment to avoid misleading future maintainers.
| # Runs on pushes targeting the default branch | |
| # Runs on pushes targeting the main branch |
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
| - name: Build with Jekyll | ||
| uses: actions/jekyll-build-pages@v1 |
There was a problem hiding this comment.
For supply-chain hardening, consider pinning GitHub Actions to a full commit SHA (instead of only major version tags). This reduces the risk of a compromised upstream tag affecting your workflow; you can still use Dependabot to keep pins updated.
| uses: actions/jekyll-build-pages@v1 | |
| uses: actions/jekyll-build-pages@<FULL_40_CHARACTER_COMMIT_SHA> # pin trusted v1 release |
| source: ./ | ||
| destination: ./_site | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 |
There was a problem hiding this comment.
For supply-chain hardening, consider pinning GitHub Actions to a full commit SHA (instead of only major version tags). This reduces the risk of a compromised upstream tag affecting your workflow; you can still use Dependabot to keep pins updated.
| uses: actions/upload-pages-artifact@v3 | |
| uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 |
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
There was a problem hiding this comment.
For supply-chain hardening, consider pinning GitHub Actions to a full commit SHA (instead of only major version tags). This reduces the risk of a compromised upstream tag affecting your workflow; you can still use Dependabot to keep pins updated.
| source: ./ | ||
| destination: ./_site | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 |
There was a problem hiding this comment.
The artifact upload step relies on upload-pages-artifact defaults for the upload path. Since the build explicitly sets destination: ./_site, consider setting with: path: ./_site here as well to keep the workflow resilient to future destination changes.
| uses: actions/upload-pages-artifact@v3 | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site |
Implements the GitHub Actions workflow from the-book-of-secret-knowledge#528 — builds and deploys a Jekyll site to GitHub Pages.
Changes
.github/workflows/jekyll-gh-pages.yml— new workflow with two jobs:build: checkout → configure Pages → Jekyll build → upload artifactdeploy: deploys artifact to GitHub Pages environmentTriggers on
pushtomainandworkflow_dispatch. Concurrency group"pages"prevents overlapping deployments without cancelling in-flight runs.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.