-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not deploy forked repositories #313
Conversation
9959d0e
to
808110b
Compare
When will users want to deploy a manuscript to GitHub Pages? In general, I think they'll only want to deploy the upstream manuscript in case of forks. Although this may not always be the case. Sometimes a fork may want to deploy as well. Perhaps we could default to only deploying non-fork repos with a way to override and deploy a fork. |
I agree that the default should be that forks do not deploy. Users may want to build the manuscript in a fork to test changes as long as it doesn't deploy. |
The problem is with our current configuration, we have: on:
push:
branches:
- master
pull_request:
branches:
- master So we're not building branches on forks, which is the main place users would be testing these changes. I propose merging this PR as a quick fix since it will prevent failing fork master builds. And then thinking more about the ideal configuration. |
For reference, I dumped the github actions context in this workflow run https://github.com/dhimmel/rootstock-actions-deploy/runs/453060191 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose merging this PR as a quick fix
Works for me. I wasn't sure why both conditional statements are needed, but if it has the intended behavior that's good enough for me.
Another possibility is that we could use the
I will remove the first. Was for testing, but didn't actually test anything. |
What's the default state of |
See https://github.com/dhimmel/manubot-rootstock/actions/runs/41309705 for the fork action on the merged commit. |
It still tried to deploy? |
It seems that forking on github does replicate the Update: actually it's "has_pages": false, will delete
ahh. will debug |
Hopefully fixed in dhimmel@cd8ce12. If the deployment is properly skipped I will push this commit to Skipped in https://github.com/dhimmel/manubot-rootstock/runs/453222057 |
merges manubot/rootstock#313 Previously deployment was governed by the presence of MANUBOT_SSH_PRIVATE_KEY, but now that GITHUB_TOKEN is supported for deployment, forks with master branch commits attempted to deploy.
It looks like GitHub actions was also running on my fork. Now GitHub Actions deploys even without a manually set SSH Key. Therefore, it tried to deploy on my fork.