Skip to content

ci(pages): guard the dotfile law and take the upload-pages-artifact v5 bump with the opt-in - #86

Merged
ShixiangWang merged 2 commits into
mainfrom
ci/pages-artifact-v5-guard
Nov 7, 2026
Merged

ShixiangWang merged 2 commits into
mainfrom
ci/pages-artifact-v5-guard

Conversation

@ShixiangWang

Copy link
Copy Markdown
Contributor

Closes #83's hazard. Supersedes dependabot PR #83.

Why

actions/upload-pages-artifact v4.0.0 tars the Pages artifact with an
unconditional --exclude=".[^/]*", so every dotfile at the artifact root is
dropped. v5.0.0 keeps that exclude behind the new include-hidden-files input,
whose declared default is "false" — the drop is still the default there.

.github/workflows/pkgdown.yaml writes docs/.nojekyll in the build step, and
that file is what keeps Jekyll from re-rendering the published tree. Merging
#83 as-is would have silently un-written it, and nothing downstream would have
noticed: the upload/deploy checks were name-only and the pin check was
length-only.

Measured directly off each ref's action.yml (?ref= raw fetch):

ref include-hidden-files exclude
v3.0.1 absent .git, .github only
v4.0.0 absent --exclude=".[^/]*" unconditional
v5.0.0 declared, default: "false" ${{ inputs.include-hidden-files != 'true' && '--exclude=.[^/]*' || '' }}

What

  1. Bump pkgdown.yaml to upload-pages-artifact@fc324d35… # v5.0.0 together
    with
    with: include-hidden-files: true, so the dotfile survives.
  2. Close the gate gap that let this through:
    • tools/action_pins.py accepts a patch-level note (# v5.0.1), which trunk
      already carries on deploy-pages; the note is an audit annotation only —
      immutability comes from the SHA.
    • tools/ci-selfcheck.py runs the pin law over all four workflows, not
      just the two the PR gate builds (pkgdown.yaml and release.yml carried
      pins nothing ever inspected).
    • A new law: any upload-pages-artifact pin at major >= 4 in pkgdown.yaml
      must set include-hidden-files: true, with a firing control proving a v4+
      pin without the opt-in is refused.

/tmp-local checks: python3 tools/ci-selfcheck.py exits 0, PASS (all CI wiring assertions hold).

Test plan

  • pkgdown workflow lands the site and .nojekyll is present in the
    deployed artifact (the site must not fall back to Jekyll rendering).
  • CI three-arm PR gate green.
  • python3 tools/ci-selfcheck.py exit 0 on the runner.

ShixiangWang and others added 2 commits November 7, 2026 18:47
…e law

tools/ci-selfcheck.py ran the action-pin law over ci.yml and scheduled.yml
only, so pkgdown.yaml and release.yml carried pins nothing ever inspected.
The one check that did look at pkgdown.yaml was length-only, which is how
dependabot's upload-pages-artifact bump from v3 to v5 could swap the comment
note without any assertion noticing.

Widen the pair set to all four workflows, and add the missing substantive
law: upload-pages-artifact v4.0.0 tars with an unconditional
`--exclude=".[^/]*"`, and v5.0.0 keeps that exclude behind an
`include-hidden-files` input whose declared default is "false". Either major
therefore drops every root dotfile -- including the docs/.nojekyll that
pkgdown.yaml writes for the Pages deploy -- so require the explicit opt-in
whenever such a pin is present. The law carries its own firing control.

tools/action_pins.py learns the `# vN.N[.N]` comment form, which the trunk
already uses (`deploy-pages # v5.0.1`); without it, scanning pkgdown.yaml
would have reddened the tree for a purely cosmetic note.
…ck in

v4.0.0 tars the Pages artifact with an unconditional --exclude=.[^/]*,
so every dotfile at the artifact root is dropped. v5.0.0 keeps that
exclude behind `include-hidden-files`, whose declared default is
"false" -- the drop is still the default. Either pin silently un-writes
the `docs/.nojekyll` the build step above writes, which is what keeps
Jekyll from re-rendering the tree, and nothing else in the pipeline
would notice.

Take the v5 bump together with the explicit opt-in so the dotfile
survives, and keep the pin auditable at its major tag.
@ShixiangWang
ShixiangWang merged commit 2a291d1 into main Nov 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant