Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
80ff31e
new branch with recent main changes
kaijli Jan 14, 2025
c31dff9
trying a different spell checker
kaijli Jan 15, 2025
f1a84f3
fix syntax error
kaijli Jan 15, 2025
618082e
update dictionary and json path
kaijli Jan 15, 2025
94e93e7
update dictionary and remove env vars
kaijli Jan 15, 2025
e148242
testing with import
kaijli Jan 15, 2025
349cf26
split yml into two
kaijli Jan 15, 2025
762fa5d
remove the need build
kaijli Jan 15, 2025
7f30a3a
recombined files, changed call order
kaijli Jan 15, 2025
e49d7e4
change spell check output
kaijli Jan 15, 2025
c3d6013
added resource links
kaijli Jan 15, 2025
62f52ce
typo
kaijli Jan 15, 2025
8a7c3f7
fix logic for spell check ticket creation
kaijli Jan 15, 2025
720dafa
trying to grab workflow outputs
kaijli Jan 15, 2025
30b3adc
pipe std out for spell check
kaijli Jan 15, 2025
4df4582
changed allow list name and link check call
kaijli Jan 17, 2025
746549a
removed file used to test
kaijli Jan 17, 2025
f5613c4
remove uses in link check
kaijli Jan 17, 2025
239e7d8
use verbose mode
kaijli Jan 17, 2025
ac9f592
testing npx usage
kaijli Jan 17, 2025
fa4fded
merge main into this branch for testing
kaijli Jan 17, 2025
d5bd79b
Merge branch 'main' into 61-add-link-checker
kaijli Jan 17, 2025
ab1a28e
add quiet mode
kaijli Jan 17, 2025
abb4a97
tee stdout instead of pipe
kaijli Jan 17, 2025
91f526a
change error search
kaijli Jan 17, 2025
4f80cd0
use boolean to activate github issue creation
kaijli Jan 17, 2025
728a56d
check output files
kaijli Jan 17, 2025
d3a8e46
testing json usage
kaijli Jan 17, 2025
4621a31
check syntax
kaijli Jan 17, 2025
20dc8c3
remove commented code
kaijli Jan 17, 2025
27f3287
i don't know why it's not working
kaijli Jan 17, 2025
035303e
change logic for ticket creation
kaijli Jan 17, 2025
1cf9473
try again with github output var
kaijli Jan 17, 2025
02a99c9
testing spell check issue creation
kaijli Jan 17, 2025
1fb1618
all parts working, generating pr
kaijli Jan 17, 2025
795e3f3
commenting out pull request run because logically, it needs some thin…
kaijli Jan 17, 2025
839c64d
retesting checkers
kaijli Jan 28, 2025
e630bab
add second link checker and pause issue creation
kaijli Jan 28, 2025
74a2523
put another link checker in to test
kaijli Jan 29, 2025
8cf2c58
remove other test link checkers and update artifact paths
kaijli Jan 29, 2025
4b32e6d
Merge branch 'main' into 61-add-link-checker
eecavanna Jan 29, 2025
91a06ec
Use `lychee` to scan website file tree for broken links
eecavanna Jan 29, 2025
91088ff
Configure workflow to only run when invoked by another workflow
eecavanna Jan 29, 2025
fce879c
Specify correct website root directory to `lychee` (oops)
eecavanna Jan 29, 2025
e2a393e
Bump `lycheeverse/lychee-action` to version 2
eecavanna Jan 29, 2025
38726a9
Merge branch 'main' into 61-add-link-checker
eecavanna Jan 30, 2025
4fcfd50
Update checker(s) workflow to depend upon `assemble-website` workflow
eecavanna Jan 30, 2025
5597395
Untar the artifact archive into a file tree before scanning it
eecavanna Jan 30, 2025
1999766
Create destination directory before using it (oops)
eecavanna Jan 30, 2025
c1e4c6a
Delete obsolete config file
eecavanna Jan 30, 2025
f80ac6e
Check out commit so job has access to `spellcheck_allow_list.txt`
eecavanna Jan 30, 2025
01a709e
Move the spellcheck allow list into new `supporting_files` subdirectory
eecavanna Jan 30, 2025
0269e8a
Separate the link check and spell check into two GHA workflows
eecavanna Jan 30, 2025
6e733ea
Clarify step name
eecavanna Jan 30, 2025
b0bd752
Invoke `spellchecker-cli` via off-the-shelf action instead of via `npx`
eecavanna Jan 30, 2025
9f30640
Trigger checker workflows from assembler workflow (instead of opposite)
eecavanna Jan 30, 2025
6797ef1
Avoid compiling home docs multiple times per PR update
eecavanna Jan 30, 2025
fe43af5
Bump `spellchecker-cli-action` to latest version
eecavanna Jan 30, 2025
693cfb5
Create directory before using it
eecavanna Jan 30, 2025
1412bbd
Only create GitHub Issue about broken links if processing `main` branch
eecavanna Jan 30, 2025
3c6ee67
Dump path of working directory (for debug)
eecavanna Jan 30, 2025
dfa5427
Delete preliminary spell checking GHA workflow and supporting files
eecavanna Feb 5, 2025
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
12 changes: 12 additions & 0 deletions .github/workflows/assemble-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
name: Assemble website

on:
# Run this workflow whenever someone opens or adds commits to a PR whose base branch is `main`.
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
pull_request: { branches: [ main ] }
# Allow this workflow to be run manually (e.g., via the "Actions" tab on GitHub).
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch: { }
# Allow this workflow to be called by other workflows.
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows
Expand Down Expand Up @@ -61,3 +66,10 @@ jobs:
# anyway, here, as a reminder for people that will be implementing workflows that consume the same
# artifact; e.g., spell checkers and link checkers.
name: github-pages

# Use existing workflow(s) to check the file tree for broken links.
check-links:
name: Check links
uses: ./.github/workflows/check-links.yml
needs:
- assemble
47 changes: 47 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This GitHub Actions workflow finds links in HTML files and creates a GitHub Issue if any of them doesn't work.
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
name: Check links

on:
# Allow this workflow to be called by other workflows.
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows
workflow_call: { }

jobs:
check-links:
name: Check links
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
- name: Get website file tree
uses: actions/download-artifact@v4 # docs: https://github.com/actions/download-artifact
with:
name: github-pages
path: _downloads
- name: Un-tar the archive
run: |
pwd
mkdir -p _build/html
tar -xvf _downloads/artifact.tar -C _build/html
ls -lR _build/html
- name: Use Lychee to check for broken links
# This step will populate `steps.lychee.outputs.exit_code` with the exit code returned by lychee.
# Reference: https://github.com/lycheeverse/lychee-action
id: lychee
uses: lycheeverse/lychee-action@v2
with:
# Note: The `--format` option refers to the format of the report, not the documents being scanned.
# Reference: https://github.com/lycheeverse/lychee#commandline-parameters
args: --base '_build/html' --verbose --no-progress --format markdown '_build/html/**/*.html'
debug: true
output: ./lychee/out.md
fail: false
- name: Create GitHub Issue listing broken links
# This step will only run if both (a) lychee returned a non-zero exit code and (b) we are on the `main` branch.
# Reference: https://docs.github.com/en/actions/learn-github-actions/variables#using-the-env-context-to-access-environment-variable-values
if: steps.lychee.outputs.exit_code != 0 && github.ref == 'refs/heads/main'
uses: peter-evans/create-issue-from-file@v5
with:
title: Website file tree contains broken links
content-filepath: ./lychee/out.md
6 changes: 2 additions & 4 deletions .github/workflows/compile-home-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
name: Compile home documentation into HTML

on:
push: { branches: [ main ] }
# Run this workflow whenever someone opens or adds commits to a PR whose base branch is `main`.
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
pull_request: { branches: [main] }
# Allow this workflow to be run manually (e.g., via the "Actions" tab on GitHub).
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch: { }
# Allow this workflow to be called by other workflows.
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
name: Deploy to GitHub Pages

on:
# Run this workflow whenever someone pushes commits or tags to the `main` branch.
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push
push: { branches: [ main ] }
# Allow this workflow to be run manually (e.g., via the "Actions" tab on GitHub).
# Reference: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch: { }

# Reference: https://docs.github.com/en/actions/using-jobs/using-concurrency
Expand Down