Skip to content

fix: skip docs deployment workflow on forks#2171

Merged
mnriem merged 1 commit intogithub:mainfrom
mnriem:fix/docs-workflow-fork-skip
Apr 10, 2026
Merged

fix: skip docs deployment workflow on forks#2171
mnriem merged 1 commit intogithub:mainfrom
mnriem:fix/docs-workflow-fork-skip

Conversation

@mnriem
Copy link
Copy Markdown
Collaborator

@mnriem mnriem commented Apr 10, 2026

Summary

Add if: github.repository == 'github/spec-kit' to both the build and deploy jobs in the docs workflow so they skip with success on forks.

Problem

The "Deploy Documentation to Pages" workflow triggers on forks even when no docs/ files changed, causing failed workflow runs for contributors.

Solution

Both jobs now check the repository name and skip immediately on forks, showing a green checkmark instead of a failure.

Add repository check to build and deploy jobs so they skip
with success on forks, avoiding failed Pages deployments for
contributors.
Copilot AI review requested due to automatic review settings April 10, 2026 22:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the documentation deployment GitHub Actions workflow to avoid running build/deploy jobs on forked repositories.

Changes:

  • Add a repository check (if: github.repository == 'github/spec-kit') to the docs build job.
  • Add the same repository check to the docs deploy job.
Show a summary per file
File Description
.github/workflows/docs.yml Gate the build and deploy jobs so they don’t execute on forks.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

.github/workflows/docs.yml:29

  • This condition hard-codes a single repository slug. If the repo is transferred/renamed, docs builds/deploys will start getting skipped unexpectedly. Since the goal is to skip forks, consider checking the fork flag instead (e.g., github.event.repository.fork == false) or github.repository_owner == 'github' to keep the workflow robust to renames/transfers.
    if: github.repository == 'github/spec-kit'
  • Files reviewed: 1/1 changed files
  • Comments generated: 2

@mnriem mnriem merged commit cdbea09 into github:main Apr 10, 2026
12 checks passed
@mnriem mnriem deleted the fix/docs-workflow-fork-skip branch April 10, 2026 22:58
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.

2 participants