Repository navigation
fix: set deploy commit identity and token for gh-pages - #10
Conversation
gh-pages' -u parser rejects the unquoted '[bot]' address, so the identity now comes from git config. gh-pages also clones into a cache dir that doesn't inherit checkout's auth header, so the token goes in the remote URL.
|
Local end-to-end test of the publish step ( I ran the step's exact commands against a throwaway local bare repo. The remote was set to the CI-shaped URL This confirms that the CI on this PR: |
What and why
The first automatic Deploy run (after #9 merged) failed at the publish step:
This PR fixes two problems in
.github/workflows/deploy.yml:gh-pages -uparses its value as an RFC 5322 address, and[]aren't allowed unquoted, so the[bot]name fails. The identity now comes fromgit config user.name/user.email, which gh-pages reads when-uis absent.node_modules/.cache/gh-pages. That clone doesn't inherit the auth headeractions/checkoutstores in the workspace's.git/config, so the push would be rejected. The remote URL now carriesGITHUB_TOKEN, as the gh-pages README recommends for Actions. The job already hascontents: write. GitHub masks the token in logs.The site is currently live from a manual
npm run deployoffmainat653e123(the fallback in CONTRIBUTING §7).How it was tested
email-addressesparser gh-pages uses. Confirmed gh-pages falls back togit configwhen-uis omitted (lib/index.jsgetUser()).npm run lint: 0 errors.npm run check-links: no internal dead links.npm run build: OK.fix/deploy-workflow. The built site is identical to what's live, since only the workflow changed. Otherwise, the first push tomainafter merging exercises it.Performance (Lighthouse, mobile, median of 3, local Edge; no site code changed)
#/#/aboutAfter merge
Per the deployment checklist: CI on
main→ Deploy green → pages-build-deployment green → check https://devilquant.com. Deletefix/deploy-workflowafterwards.