Prevent deployment of docs on forked repositories#1310
Prevent deployment of docs on forked repositories#1310wsmoak wants to merge 1 commit intobmad-code-org:mainfrom
Conversation
Add condition to prevent deployment of docs on forked repositories
📝 WalkthroughWalkthroughA conditional guard is added to the GitHub Actions docs workflow to prevent the deploy job from executing in forked repositories, using Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
alexeyv
left a comment
There was a problem hiding this comment.
we actually want this workflow to run on SOME forks
There are other forks where you want the docs published when the main branch is synced? That's all I'm skipping here. Not the entire workflow, just that step. Every time I sync my fork (which brings the main branch up to date) I get an email like this: And you can see the failures on the |
alexeyv
left a comment
There was a problem hiding this comment.
As discussed on bmad-core, I think that the right way to do it for docs is this:
if: ${{ github.repository == [official repo] || secrets.BMAD_ENABLE_DOCS == 'true' }}
quality workflow needs no guard, discord can be "if not fork", and the rest should probably be like docs, but use their own dummy secret names.
|
@wsmoak is this still and issue / can you update against latest and ensure its still valid? |
|
closing since no updates on this |

Whenever I sync my fork of BMAD-METHOD I notice that all the GitHub Actions (Workflows) try to run.
Example: https://github.com/wsmoak/BMAD-METHOD/actions/runs/20866029502
Let's try to prevent the docs deployment from running on forks, since that is never going to work.
Inspired by: https://beckysweger.com/2025/01/02/skip-a-job-in-a.html
In another repository we tried
if: ${{ github.repository == 'the-organization/the-repository' }}
which seems like it should have worked, but it did not.