Skip to content

ci: docs branches run hand-synced copies of the publish workflow #1164

Open

Description

@nikagra

Every docs branch carries its own copy of .github/workflows/docs-pages.yml: scylla-4.x, scylla-3.x, scylla-4.19.0.x, scylla-4.19.2.x, scylla-3.11.5.x and, after #1141, scylla-4.18.1.x. A push to any of them runs that branch's copy, which checks out the default branch and rebuilds and deploys the whole site.

The copies are synced by hand, and they have already drifted once: #1141 exists because scylla-4.18.1.x's copy used unpinned actions and had no contents: write, so it could never publish.

Drift can also fail silently. Each copy runs the default branch's docs/_utils/check-javadoc-output.sh and reads its not-built and missing-api outputs by name. If scylla-4.x renames an output or adds a guard step, and only its own copy is updated (README-dev.md names a single docs-pages.yml), the stale copies evaluate if: on an empty value and skip Fail if any version lost content. A publish started from one of those branches that strips a version's api/ then finishes green.

Fix: keep the real job only on the default branch. On the other branches, replace it with a stub: the same push + paths trigger, permissions: actions: write, and a single step gh workflow run docs-pages.yml --ref ${{ github.event.repository.default_branch }}. GITHUB_TOKEN is allowed to start workflow_dispatch runs, and a stub that uses no actions is unaffected by the SHA-pin policy.

#1137 (build from release tags) would make the per-branch copies moot. This is the cheap fix until then.

Refs: #1141, #1133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions