-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Decouple Deployment to Github Pages from Published Action #3403
Comments
@seanh: Any thoughts on this topic? |
@justinmayer I think it's a great idea to let people test if the build succeeds on their PR before merging and trying to deploy it! I would probably implement it slightly differently than what @noelmiller has done. Here's what I'd try:
The With this approach the One advantage of this setup is that if someone ever implements a workflow for deploying to some other hosting service besides GitHub Pages, that workflow could also call the same |
Hi @seanh! I appreciate you reviewing this so quickly and providing awesome feedback. I will see if I can put a PR together with your suggestions and ping you and @justinmayer for review. Cheers! Noel Miller |
@seanh How does this look as a first pass? #3404 If we want to keep the workflows running in the same way, I had to use inputs for both workflows. Here is what I have in my website repo as an example: https://github.com/noelmiller/noelmiller.github.io/tree/main/.github/workflows Here is a successful build: https://github.com/noelmiller/noelmiller.github.io/actions/runs/11243940338 |
Hi @noelmiller, #3404 looks like the right approach to me at a glance. It may be a few days before I can test and review it but I'll try to get to it soon |
Feature Request
Hi There!
When building my pelican site in a PR, I noticed that the action the pelican team publishes will push the deployment to github pages no matter what. My suggestion would be to decouple the deployment of the site and the building of the site from each other. This way, you can skip the publish job when running the build workflow from a PR and can ensure your build is successful in a PR before merging your change into your main branch.
Here is an example of what I did in my pelican.yml: https://github.com/noelmiller/noelmiller.github.io/blob/main/.github/workflows/pelican.yml
Line 15 is the important part: https://github.com/noelmiller/noelmiller.github.io/blob/e8322ab315dae4a488ba403fd2b78ddfacedee41/.github/workflows/pelican.yml#L15
Here is what I did in my fork: main...noelmiller:pelican:main
I'm filing an issue because I'm not sure if this is something you guys would want? It would just require removing that section and including documentation on what a user is supposed to do.
Thoughts?
Thanks,
Noel Miller
The text was updated successfully, but these errors were encountered: