Skip to content

ci: deploy the api reference from the main tip only, one deploy at a time - #2038

Merged
Tonours merged 2 commits into
mainfrom
ci/pages-deploy-race
Oct 26, 2026
Merged

Tonours merged 2 commits into
mainfrom
ci/pages-deploy-race

Conversation

@Tonours

@Tonours Tonours commented Oct 23, 2026

Copy link
Copy Markdown
Member

The API reference now deploys from the tip of main only, one deploy at a time.

What

File Change
.github/workflows/build.yml publish-api-reference gets concurrency: pages-${{ github.ref }} (cancel-in-progress: false) and a first step that compares github.sha with the current tip of the branch. Not the tip: Setup Pages and the deploy are skipped with a notice, and the job stays green.

Why

  • Four PRs merged within a minute today. The run for d57be6091 hit the deploy while the newer 9a884d4e6 was already deploying, and GitHub refused it: 400 ... due to in progress deployment (run 39978461570).
  • Concurrency alone is not enough. That older run reached the deploy after the newer one, so serialized it would have waited, then overwritten the fresh reference with stale docs. The tip check kills that case: only the newest run publishes, same idea as the release job draining the backlog from the tip.

How to test

  • actionlint (docker rhysd/actionlint) on build.yml: same 2 pre-existing findings before and after, none on these lines.
  • gh api repos/ForestAdmin/agent-nodejs/git/ref/heads/main --jq .object.sha run locally returns the tip SHA.
  • Not run on main yet: the next burst of merges is the real test (older runs should show the skip notice, the tip run deploys).

Definition of Done

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

Comment thread .github/workflows/build.yml Outdated
@qltysh

qltysh Bot commented Oct 23, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@PMerlet PMerlet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spec (no ticket: the PR description): conforms.

Comment thread .github/workflows/build.yml

@PMerlet PMerlet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after /validator run 2038-20261023165727-PMerlet: nothing blocking posted, 0 preferential or code style, 0 suppressed below all.

@Tonours
Tonours merged commit ddf7700 into main Oct 26, 2026
33 checks passed
@Tonours
Tonours deleted the ci/pages-deploy-race branch October 26, 2026 11:06
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.

2 participants