By the end of today you can
- Work on a branch and propose a change through a pull request
- Read a workflow’s triggers, jobs, steps, and permissions
- Run the same checks locally before pushing
- Explain what a passing check does, and does not, establish
Start from Chapter 13 (branch chapter-13): clean, pushed, and publishing through Chapter 7’s workflow.
Two deliberate differences
- Trigger:
pull_requestexamines a proposal; Chapter 7’spushtomainpublishes what is accepted - Permissions: publishing needs
pages: writeandid-token: write; checking needs onlycontents: read
A job fails when any step exits non-zero. grep succeeding means it found the forbidden thing, so exit 1.
CI: changes checked as they are proposed. CD: delivery, our Chapter 7 workflow.
Run the checks locally first
hugo --minify --panicOnWarning
grep -n '"start_here": *"' assets/data/resource_links.json
grep -rn '](/' content/
grep -c '^description:' content/articles/*/index.md content/projects/*/index.md- The first two
grepcommands should print nothing - The last prints a count per page, and one says
0: the first learning note
A check you can only run on GitHub is a slow way to find a typing mistake.
Raise the content, not the rule
The first learning note predates the article model. The check is correct; the page is out of date. Add to its front matter:
description: "Editing a page in my notebook, checking the result, and recording what changed."Rerun: every page reports 1. Commit and push the repair on main.
A wrong rule? Change it deliberately, and say why. Never quietly exempt one file.
A fifth record, at the end of the array
{
"title": "GitHub: Actions documentation",
"url": "https://docs.github.com/en/actions",
"description": "...",
"topics": ["GitHub Actions", "Automation"],
"start_here": false
}Add a comma before it. Its description: The official reference for automating builds, checks, and deployments on GitHub.
Push the branch
Preview Resources, then:
hugo --minify --panicOnWarning
git add assets/data/resource_links.json
git diff --cached
git commit -m "Add the GitHub Actions documentation to the resource directory"
git push -u origin add-actions-resource-u connects the branch to GitHub for later pushes.
This push publishes nothing: you are not on main.
Read the failure from the top
- Build the website succeeded: this is valid JSON
- Check that directory flags are Booleans failed, printing the line and the message
- The first failing step is the one to act on; later steps may not have run
Restore "start_here": false, check locally, commit, and push: the checks pass.
A machine caught a broken rule before publication.
Require the check
In Settings, create a ruleset for main that requires the checks status to pass.
- The check must have run once before GitHub can offer it
- As the owner, you can usually still bypass your own rule
- For a solo author it is a reliable reminder: bypassing becomes deliberate, not an oversight
GitHub will not let you approve your own pull request: review means reading Files changed yourself.
What a green check means
| The checks establish | Only you can establish |
|---|---|
| The site builds, warnings as failures | The writing is accurate |
| Directory flags are Booleans | The resource is worth listing |
| Internal links are relative | They go where a reader expects |
| Pages have a description | It describes the page honestly |
A green check is permission to look properly, not a verdict. Chapter 13’s unsupported sentence passes all four.
Merge and verify
Read Files changed once more: one added record. Merge it.
Merging is a push to main, so the publishing workflow runs:
- Both workflows in the Actions history, with distinct names
- The live Resources page: five records, one Start here label
- The first learning note, Projects, navigation, and footer: unchanged
When something goes wrong
| What you see | What to check |
|---|---|
| The checks do not run | It triggers on pull_request only |
| A page you did not touch fails | Expected at first: raise it to the rule |
| The build fails; rules do not run | Steps stop at the first failure |
| Pushing the branch published the site | Were you on main? |
| The check is not selectable | It must have run once |
Completion check
- I can explain the checks workflow’s trigger and narrow permissions
- I ran the three rule checks locally
- I raised an older page to the rule instead of weakening it
- I opened a pull request without publishing anything
- I broke a rule, found the failing step, and repaired it
- I required the check, and know what my bypass means
- I can name something true that no check here could establish
- I merged, watched it deploy, and verified the live result