Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Jekyll site
on:
pull_request:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am used to limiting this to specific branches. However, if you aren't deploying anything I think that won't be necessary here.

workflow_dispatch:

jobs:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best practice is to be explicit with the permissions:

Suggested change
jobs:
jobs:
permissions:
contents: read

This is probably not essentially, but does protect against GH changing default permissions in the future. reference


build:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More of an FYI: this style of version specification is being discouraged for security nowadays. This is because version numbers on GH actions are not immutable, and could be maliciously changed/released. The workaround is to specific full git SHAs.

However, this is very tedious to keep up with, and really necessitates dependabot managing actions. Given that these are all 'actions` maintained I think the risk of a malicious release is rather low, so I think in this case it's fine as is. Just an FYI. Reference.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Setup Pages
uses: actions/configure-pages@v6
- name: Build
uses: actions/jekyll-build-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
retention-days: 14


14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ In order to edit this file, you can:
* (advanced) edit the CSS style files: `_sass/_variables.scss` or
`_sass/_bootstrap_customization.scss`

## CI Testing of File Rendering

(see below for local testing)

When a pull request (PR) is submitted for this repository, an action will automatically attempt to build the
pages and upload an artifact of that process as part of the test, named `github-pages`. The artifact can be
found by viewing the results of the test, clicking on the “Summary” and scrolling to the bottom of the page.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option maybe? with out scrolling through CI summary.

Image


To view the result of the pages you can:
* download the artifact
* unzip the file
* change to the folder that is created
* run `python3 -m http.server` and open the location on your browser, usually `localhost:8000`

## Local testing of file rendering

In order to test the rendering of the files, you can run a local Jekyll server
Expand Down