Skip to content

# Sequence diagram for Jekyll site build and GitHub Pages deployment workflow #231

@Dargon789

Description

@Dargon789

Reviewer's Guide

Adds a new GitHub Actions workflow to build a Jekyll site with preinstalled GitHub Pages dependencies and deploy it to GitHub Pages on pushes to main or manual dispatch.

Sequence diagram for Jekyll site build and GitHub Pages deployment workflow

sequenceDiagram
  participant Dev as Developer
  participant Repo as GitHub_Repository
  participant Actions as GitHub_Actions_Workflow
  participant Build as Job_build
  participant Deploy as Job_deploy
  participant Checkout as actions_checkout_v4
  participant ConfigurePages as actions_configure_pages_v5
  participant JekyllBuild as actions_jekyll_build_pages_v1
  participant UploadArtifact as actions_upload_pages_artifact_v3
  participant DeployPages as actions_deploy_pages_v4
  participant Pages as GitHub_Pages

  Dev->>Repo: Push commit to main
  Repo-->>Actions: Trigger workflow (push to main)
  activate Actions

  Actions->>Build: Start build job (ubuntu-latest)
  activate Build
  Build->>Checkout: Run checkout step
  Checkout-->>Build: Repository checked out

  Build->>ConfigurePages: Configure Pages
  ConfigurePages-->>Build: Pages configuration ready

  Build->>JekyllBuild: Build Jekyll site (source ./, destination ./_site)
  JekyllBuild-->>Build: Static site generated in _site

  Build->>UploadArtifact: Upload Pages artifact
  UploadArtifact-->>Build: Artifact stored for deployment
  deactivate Build

  Actions->>Deploy: Start deploy job (needs build)
  activate Deploy
  Deploy->>DeployPages: Deploy artifact to GitHub Pages
  DeployPages-->>Pages: Publish site to GitHub Pages
  DeployPages-->>Deploy: Output page_url
  deactivate Deploy

  Actions-->>Dev: Workflow completed with published site URL
Loading

Flow diagram for GitHub Actions Jekyll build and deploy jobs

flowchart TD
  A["Workflow triggers\n- push to main\n- workflow_dispatch"] --> B["Set GITHUB_TOKEN permissions\ncontents: read, pages: write, id-token: write"]
  B --> C["Configure concurrency\nGroup: pages, cancel-in-progress: false"]

  C --> D["Job build\nRuns-on: ubuntu-latest"]
  D --> D1["Step: actions/checkout@v4"]
  D1 --> D2["Step: actions/configure-pages@v5"]
  D2 --> D3["Step: actions/jekyll-build-pages@v1\nsource: ./, destination: ./_site"]
  D3 --> D4["Step: actions/upload-pages-artifact@v3"]

  D4 --> E["Job deploy\nRuns-on: ubuntu-latest\nEnvironment: github-pages"]
  E --> E1["Step: actions/deploy-pages@v4\nuses artifact from build\noutputs: page_url"]
Loading

File-Level Changes

Change Details Files
Introduce a GitHub Actions workflow for Jekyll build and GitHub Pages deployment.
  • Configure triggers to run on pushes to the main branch and on manual workflow_dispatch.
  • Set GITHUB_TOKEN permissions for contents read, pages write, and id-token write, and configure concurrency to allow only one deployment at a time.
  • Define a build job that checks out the repository, configures GitHub Pages, builds the site using actions/jekyll-build-pages, and uploads the generated _site directory as an artifact.
  • Define a deploy job that depends on the build job and uses actions/deploy-pages to publish the uploaded artifact to the github-pages environment, exposing the deployed page_url as the environment URL.
.github/workflows/jekyll-gh-pages.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Originally posted by @sourcery-ai[bot] in #230 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationduplicateThis issue or pull request already existsenhancementNew feature or requestgood first issueGood for newcomersinvalidThis doesn't seem rightjavascriptPull requests that update javascript codequestionFurther information is requested

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions