Skip to content

Move docs workflows to elastic/docs-actions#514

Merged
theletterf merged 1 commit intomainfrom
migrate/docs-actions-workflows
Mar 30, 2026
Merged

Move docs workflows to elastic/docs-actions#514
theletterf merged 1 commit intomainfrom
migrate/docs-actions-workflows

Conversation

@Mpdreamz
Copy link
Copy Markdown
Member

Summary

Moves our docs CI/CD workflow logic from elastic/docs-builder to
elastic/docs-actions.
elastic/docs-builder has grown in scope; elastic/docs-actions lets the
docs team push updates to the @v1 tag independently without coupling to
the broader builder tooling.

The new setup follows GitHub's recommended two-phase workflow approach:
all required checks on pull requests now run with read-only access only.
Preview deployments and PR comments happen in a separate phase triggered
after the required check completes.

Replaces preview-build.yml and docs-cleanup.yml with three new workflow
files: docs-build.yml, docs-deploy.yml, and docs-preview-cleanup.yml.

Preview deployments for forks:
Preview deployments are not available for fork PRs by default. If you are an
Elastic employee working from a fork, previews will work once your Elastic
GitHub organization membership is set to Public:

  1. Go to https://github.com/orgs/elastic/people and find your name

  2. Open the visibility dropdown next to your name and select Public

    Or: GitHub profile -> Organizations -> Elastic logo -> set visibility
    to Public.

Contributors outside Elastic will still get build validation feedback on
their PRs -- only preview deployments are skipped.

Post-merge

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

cc @elastic/ingest-docs

Moves docs CI/CD from elastic/docs-builder to elastic/docs-actions.
Part of elastic/docs-eng-team#474
@Mpdreamz Mpdreamz requested review from a team as code owners March 30, 2026 11:17
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

This change restructures the documentation workflow configuration by migrating from the elastic/docs-builder repository to elastic/docs-actions. The docs-build workflow was modified to use the new reusable workflow and adjusted its trigger conditions. The docs-cleanup workflow was removed entirely. Two new workflows were added: docs-deploy triggers after docs-build completion, and docs-preview-cleanup handles cleanup on pull request closure. Repository permissions were explicitly defined across workflows, with specific capabilities granted for deployments and pull request operations.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch migrate/docs-actions-workflows
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/docs-deploy.yml:
- Around line 3-5: The deploy workflow currently triggers on workflow_run types:
[completed] which includes failed/cancelled runs; add an explicit success check
by gating the deploy job with an if condition that tests
github.event.workflow_run.conclusion == 'success' (use the GitHub Actions
expression syntax ${{ github.event.workflow_run.conclusion == 'success' }}) so
the docs-deploy job only runs when the docs-build upstream workflow passed;
reference the existing workflow_run, workflows: [docs-build], and types:
[completed] settings and add the if at the job level (or top-level jobs block)
to enforce the success-only condition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f0f4bb00-ad48-4faf-93d1-af7acced9434

📥 Commits

Reviewing files that changed from the base of the PR and between 5a2f2cd and 8831843.

📒 Files selected for processing (4)
  • .github/workflows/docs-build.yml
  • .github/workflows/docs-cleanup.yml
  • .github/workflows/docs-deploy.yml
  • .github/workflows/docs-preview-cleanup.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/docs-cleanup.yml

Comment on lines +3 to +5
workflow_run:
workflows: [docs-build]
types: [completed]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In GitHub Actions, does workflow_runwithtypes: [completed]trigger for failed and cancelled upstream workflows, and isif: github.event.workflow_run.conclusion == 'success' the recommended gate?

💡 Result:

Yes, the workflow_run event with types: [completed] triggers for upstream workflows that failed, were cancelled, or succeeded. The conclusion property in github.event.workflow_run.conclusion is set to values including 'success', 'failure', and 'cancelled'. Official GitHub documentation recommends using if: github.event.workflow_run.conclusion == 'success' at the job level to gate downstream actions, as shown in examples where separate jobs handle success and failure cases. Note that there can occasionally be delays where conclusion is temporarily null, but this resolves.

Citations:


🏁 Script executed:

cat -n .github/workflows/docs-deploy.yml

Repository: elastic/elastic-otel-python

Length of output: 505


Gate deploy job on successful upstream build conclusion.

workflow_run with types: [completed] triggers for failed and cancelled upstream workflows. Add an explicit success condition so the deploy job only runs when the docs-build workflow passed.

Suggested fix
jobs:
  deploy:
+    if: ${{ github.event.workflow_run.conclusion == 'success' }}
     uses: elastic/docs-actions/.github/workflows/docs-deploy.yml@v1
     with:
       enable-vale-linting: true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/docs-deploy.yml around lines 3 - 5, The deploy workflow
currently triggers on workflow_run types: [completed] which includes
failed/cancelled runs; add an explicit success check by gating the deploy job
with an if condition that tests github.event.workflow_run.conclusion ==
'success' (use the GitHub Actions expression syntax ${{
github.event.workflow_run.conclusion == 'success' }}) so the docs-deploy job
only runs when the docs-build upstream workflow passed; reference the existing
workflow_run, workflows: [docs-build], and types: [completed] settings and add
the if at the job level (or top-level jobs block) to enforce the success-only
condition.

@theletterf theletterf merged commit 5c0b40f into main Mar 30, 2026
24 checks passed
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