Skip to content

Migrate docs workflows from preview-build to docs-actions#5618

Merged
Mpdreamz merged 6 commits into
mainfrom
migrate-docs-actions
Mar 25, 2026
Merged

Migrate docs workflows from preview-build to docs-actions#5618
Mpdreamz merged 6 commits into
mainfrom
migrate-docs-actions

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Summary

Migrates the docs CI/CD workflows from the monolithic elastic/docs-builder preview-build.yml to the new two-phase architecture in elastic/docs-actions:

  • docs-build.yml (Phase 1) — runs on pull_request / push with read-only permissions for build validation, link checking, and vale linting
  • docs-deploy.yml (Phase 2) — runs via workflow_run from the default branch with elevated permissions for preview deployments, PR comments, and link index updates
  • docs-preview-cleanup.yml — runs on pull_request_target: [closed] to clean up deployments and S3 preview objects

Removes the old docs-cleanup.yml that called docs-builder's preview-cleanup.yml.

References

Post-merge

  • Update branch protection rules to require docs-build instead of preview-build (if applicable)

Made with Cursor

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
@Mpdreamz
Mpdreamz requested a review from a team as a code owner March 25, 2026 14:05
@Mpdreamz
Mpdreamz requested a review from cotti March 25, 2026 14:05
Comment thread .github/workflows/docs-deploy.yml
Comment thread .github/workflows/docs-deploy.yml
Comment thread .github/workflows/docs-deploy.yml
Comment thread .github/workflows/docs-build.yml
@theletterf
theletterf requested review from a team as code owners March 25, 2026 14:14
Repos with restrictive default token permissions need the caller
to explicitly grant what the reusable workflows require.

Made-with: Cursor
The old preview-build.yml had enable-vale-linting: true. Phase 1 runs
the linter, Phase 2 posts the report — both need the input.

Made-with: Cursor
@Mpdreamz
Mpdreamz enabled auto-merge (squash) March 25, 2026 14:29
@Mpdreamz
Mpdreamz merged commit 0fd9e32 into main Mar 25, 2026
7 checks passed
@Mpdreamz
Mpdreamz deleted the migrate-docs-actions branch March 25, 2026 14:29
Mpdreamz added a commit that referenced this pull request Mar 25, 2026
## Summary

Adds `pull-requests: read` to the `docs-build.yml` permissions block.
The reusable build workflow needs this for the changed-files check job
to list PR files via the API.

Follow-up to #5618.


Made with [Cursor](https://cursor.com)
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.

3 participants