Migrate docs workflows from preview-build to docs-actions#558
Open
Migrate docs workflows from preview-build to docs-actions#558
Conversation
Replace the monolithic preview-build.yml caller with the new two-phase workflow architecture from elastic/docs-actions: - docs-build.yml (Phase 1): read-only build validation on PRs and push - docs-deploy.yml (Phase 2): privileged deploy via workflow_run - docs-preview-cleanup.yml: cleanup on PR close Removes the old docs-cleanup.yml that called docs-builder's preview-cleanup workflow. Part of elastic/docs-eng-team#474 Made-with: Cursor
🤖 GitHub commentsJust comment with:
|
v1v
previously approved these changes
Mar 25, 2026
Repos with restrictive default token permissions need the caller to explicitly grant what the reusable workflows require. Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Mpdreamz
added a commit
to elastic/docs-actions
that referenced
this pull request
Mar 26, 2026
When repositories migrate from elastic/docs-builder's preview-build.yml
to elastic/docs-actions' docs-build.yml, both the old and new workflows
coexist temporarily:
- The OLD workflow (on the base branch) triggers via pull_request_target
and calls preview-build.yml, which defines a concurrency group of
`${github.workflow}-${branch}`.
- The NEW workflow (on the PR branch) triggers via pull_request and calls
docs-build.yml, which defined the same concurrency group pattern.
Because both caller workflows typically share the same `name: docs-build`,
they resolve to identical concurrency groups. Both have
cancel-in-progress: true for PR events, so whichever starts second
cancels the first — causing the old workflow's jobs to show as
"cancelled" on the PR checks.
This was observed on elastic/ecs-dotnet#558, where every commit showed
the pull_request_target docs-build run cancelled by the pull_request run
(e.g. commit 3f57a7d: the pull_request_target run started at 14:48:00,
the pull_request run started 3 seconds later and cancelled it).
Adding a `docs-actions-build-` prefix to the concurrency group makes it
distinct from preview-build.yml's group, so both workflows run
independently during the migration window.
Made-with: Cursor
Merged
2 tasks
Mpdreamz
added a commit
to elastic/docs-actions
that referenced
this pull request
Mar 26, 2026
…ion (#33) When repositories migrate from elastic/docs-builder's preview-build.yml to elastic/docs-actions' docs-build.yml, both the old and new workflows coexist temporarily: - The OLD workflow (on the base branch) triggers via pull_request_target and calls preview-build.yml, which defines a concurrency group of `${github.workflow}-${branch}`. - The NEW workflow (on the PR branch) triggers via pull_request and calls docs-build.yml, which defined the same concurrency group pattern. Because both caller workflows typically share the same `name: docs-build`, they resolve to identical concurrency groups. Both have cancel-in-progress: true for PR events, so whichever starts second cancels the first — causing the old workflow's jobs to show as "cancelled" on the PR checks. This was observed on elastic/ecs-dotnet#558, where every commit showed the pull_request_target docs-build run cancelled by the pull_request run (e.g. commit 3f57a7d: the pull_request_target run started at 14:48:00, the pull_request run started 3 seconds later and cancelled it). Adding a `docs-actions-build-` prefix to the concurrency group makes it distinct from preview-build.yml's group, so both workflows run independently during the migration window. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the docs CI/CD workflows from the monolithic
elastic/docs-builderpreview-build.ymlto the new two-phase architecture inelastic/docs-actions:docs-build.yml(Phase 1) — runs onpull_request/pushwith read-only permissions for build validation, link checking, and vale lintingdocs-deploy.yml(Phase 2) — runs viaworkflow_runfrom the default branch with elevated permissions for preview deployments, PR comments, and link index updatesdocs-preview-cleanup.yml— runs onpull_request_target: [closed]to clean up deployments and S3 preview objectsRemoves the old
docs-cleanup.ymlthat calleddocs-builder'spreview-cleanup.yml.References
Post-merge
docs-buildinstead ofpreview-build(if applicable)Made with Cursor