Skip to content

Fix docs deployment from tag triggers by using workflow_dispatch#633

Merged
laughingman7743 merged 3 commits intomasterfrom
fix/docs-deployment-from-tags
Jan 1, 2026
Merged

Fix docs deployment from tag triggers by using workflow_dispatch#633
laughingman7743 merged 3 commits intomasterfrom
fix/docs-deployment-from-tags

Conversation

@laughingman7743
Copy link
Member

@laughingman7743 laughingman7743 commented Jan 1, 2026

Summary

  • Add a new workflow (docs-trigger.yaml) that triggers the docs workflow via workflow_dispatch API when a tag is pushed
  • Remove direct tag trigger from docs.yaml to ensure deployments always run in master context

Problem

When a tag (e.g., v3.23.0) triggers the docs workflow:

  1. The workflow checks out the tag ref
  2. sphinx-multiversion builds all versions correctly
  3. The deployment "succeeds" but GitHub Pages doesn't actually update the content

This is because GitHub Pages is configured with source.branch: master, and deployments from tag refs are silently ignored.

Solution

Instead of triggering the docs workflow directly from tag pushes, use a separate workflow that:

  1. Listens for tag pushes (on: push: tags: ['v*'])
  2. Triggers the docs workflow via GitHub Actions API with ref: master
  3. This ensures the docs workflow always runs in master context while still being triggered by tag releases

The actions: write permission is required to trigger workflows via the API.

Changes

  • .github/workflows/docs-trigger.yaml - New workflow to trigger docs on tag push
  • .github/workflows/docs.yaml - Removed tags: ['v*'] trigger

Test plan

  • Create a new tag and verify docs workflow is triggered via workflow_dispatch
  • Verify master push still deploys correctly
  • Verify manual workflow_dispatch still works

🤖 Generated with Claude Code

laughingman7743 and others added 2 commits January 2, 2026 00:59
Always checkout master branch in the docs workflow, even when triggered
by a tag push. This ensures GitHub Pages accepts the deployment since
it's configured with source.branch: master.

sphinx-multiversion still builds all versions (tags + master) because
fetch-depth: 0 fetches all refs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GitHub Pages only accepts deployments from the master branch context.
When a tag push triggered the docs workflow, the deployment would
silently fail to update the live site.

This change:
- Removes the tag trigger from docs.yaml
- Adds docs-trigger.yaml that triggers the docs workflow via
  workflow_dispatch API when a tag is pushed
- This ensures the docs workflow always runs in master context
  while still being triggered by tag releases

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laughingman7743 laughingman7743 changed the title Fix docs deployment from tag triggers Fix docs deployment from tag triggers by using workflow_dispatch Jan 1, 2026
@laughingman7743 laughingman7743 marked this pull request as ready for review January 1, 2026 16:17
The workflow now only runs from master context (push to master or
workflow_dispatch with ref: master), so explicit ref is redundant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laughingman7743 laughingman7743 merged commit a06e1bc into master Jan 1, 2026
5 checks passed
@laughingman7743 laughingman7743 deleted the fix/docs-deployment-from-tags branch January 1, 2026 16:40
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.

1 participant