Skip to content

Refresh regenerates the site page and redeploys it - #4

Merged
bdbarnett merged 1 commit into
PyDevicesfrom
fix/refresh-regenerates-page
Sep 25, 2026
Merged

bdbarnett merged 1 commit into
PyDevicesfrom
fix/refresh-regenerates-page

Conversation

@bdbarnett

Copy link
Copy Markdown

After every publication, the rendered page at https://PyDevices.github.io/mip/ now shows the same versions as packages.json. Before this it lagged one release, and .github's generator-idempotency check failed until someone regenerated the page by hand (PyDevices/.github#51, PyDevices/.github#54; mip has issues disabled).

What changes in refresh-package-list.yml:

  • After update_package_list.py, it checks out PyDevices/.github at main and runs scripts/generate_sites.py --only mip. .site/index.html then goes into the same commit as the list.
  • If the page changed, it puts the artifact that just went live back up with only index.html replaced, and a new redeploy-site-page job deploys it. index.json and the packages aren't rebuilt, so they stay exactly as the first deploy published them.
  • Both callers grant that job pages: write and id-token: write for the redeploy.

Merge PyDevices/.github#55 first. It adds --only. Until it's on .github's main, the regenerate step fails. The list is still committed in that case, but the job goes red.

How I checked it: actionlint 1.7.12 and a YAML parse are clean. I ran the new shell steps by hand on a clone at 855fd90, the refresh commit whose page was stale. page-changed=true came out, and the regenerated page matched 35ed524, the hand fix, byte for byte. At the tip it says page-changed=false and commits nothing.

Not proven: the redeploy itself. It only runs on a real publication or a manual deploy-mip-index-to-pages dispatch. The first publication after both PRs merge is the test. Look for a second Pages deployment in that run and the new version on the page.

The package-list refresh updated packages.json and the README but never
.site/index.html, so the rendered page lagged one publication behind and
.github's generator-idempotency check failed after every release until the
page was regenerated by hand (PyDevices/.github#51, micropython#54).

The refresh job now runs .github's generate_sites.py --only mip after
update_package_list.py and commits the page with the list. When the page
changed, it re-uploads the artifact that just went live with only index.html
replaced, and a new job deploys it.
@bdbarnett
bdbarnett merged commit e383708 into PyDevices Sep 25, 2026
7 checks passed
@bdbarnett
bdbarnett deleted the fix/refresh-regenerates-page branch September 25, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant