fix(publish): record the build as the status main's protection requires (v2.4.1) #3

Merged
poli0981 merged 2 commits from fix/publish-status into main 2026-11-24 01:33:37 +00:00
Owner

What and why

The first publish from the admin after the move (content 4634fb1, PR #2) stopped at its pull request: CI's publish job tried to merge twice and Gitea answered 405 "Not all required status checks successful". Gitea 28.4 writes commit statuses for push and pull_request runs only, never for a dispatched run, so the content/bump commit never got the CI / build (*) status main's branch protection requires.

Fix

  • ci.yml publish job: needs: build, now if: always(); it records build's result as CI / build (workflow_dispatch) on the commit it built (with the run link), then merges and dispatches the deploy only when build passed and the PR body says auto. A failed build is recorded as a failure (the admin shows "xuất bản lỗi" instead of building forever); a cancelled one records nothing.
  • scripts/content-publish.mjs + tests (8 cases).
  • Docs 08 §0b and CHANGELOG 2.4.1.

Kind of change

  • Bug fix

Checks

  • typecheck, lint, knip, astro check, npm test (253) green locally

After merge: re-run content-bump so PR #2 is rebuilt on the new main, and watch the publish job record the status, merge and deploy.

🤖 Generated with Claude Code

## What and why The first publish from the admin after the move (content 4634fb1, PR #2) stopped at its pull request: CI's publish job tried to merge twice and Gitea answered **405 "Not all required status checks successful"**. Gitea 28.4 writes commit statuses for push and pull_request runs only, never for a dispatched run, so the content/bump commit never got the `CI / build (*)` status main's branch protection requires. ## Fix - `ci.yml` publish job: `needs: build`, now `if: always()`; it records build's result as `CI / build (workflow_dispatch)` on the commit it built (with the run link), then merges and dispatches the deploy only when build passed and the PR body says auto. A failed build is recorded as a failure (the admin shows "xuất bản lỗi" instead of building forever); a cancelled one records nothing. - `scripts/content-publish.mjs` + tests (8 cases). - Docs 08 §0b and CHANGELOG 2.4.1. ## Kind of change - [x] Bug fix ## Checks - [x] typecheck, lint, knip, astro check, `npm test` (253) green locally After merge: re-run content-bump so PR #2 is rebuilt on the new main, and watch the publish job record the status, merge and deploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
poli0981 added 2 commits 2026-11-24 01:27:55 +00:00
The first publish from the admin after the move stopped at its pull request: CI's
publish job tried to merge twice and Gitea answered 405 "Not all required status
checks successful". Gitea 28.4 writes commit statuses for push and pull_request runs
only, never for a dispatched run, so the content/bump commit never got the
`CI / build (*)` status branch protection requires.

The publish job (needs: build, now if: always()) records build's result as
`CI / build (workflow_dispatch)` on the commit it built, with a link to the run, and
only then merges and dispatches the deploy. A failed build is recorded as a failure and
merges nothing, so the admin shows "xuất bản lỗi" instead of building forever; a
cancelled one records nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: 2.4.1 — dispatched runs get no commit status on Gitea
CI / build (push) Skipped
CI / build (pull_request) Successful in 5m10s
CI / publish (pull_request) Skipped
CI / deploy (pull_request) Skipped
Lighthouse / lighthouse (pull_request) Successful in 6m8s
Qodana / Qodana for JS (pull_request) Successful in 3m35s
Reusable / Security / Secrets (gitleaks) (pull_request) Successful in 12s
Reusable / Security / Rust (cargo-deny) (pull_request) Skipped
Reusable / Security / .NET (NuGetAudit) (pull_request) Skipped
Reusable / Security / SAST (Opengrep) (pull_request) Successful in 25s
Reusable / Security / Dependencies (osv-scanner) (pull_request) Successful in 17s
Security / security (pull_request) Successful in 55s
9bb5350a34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
poli0981 merged commit fa48632276 into main 2026-11-24 01:33:37 +00:00
poli0981 deleted branch fix/publish-status 2026-11-24 01:33:37 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: poli0981/poli0981-dev#3