-
Notifications
You must be signed in to change notification settings - Fork 100
Use branch input when determining GitHub deployment production status #80
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This was done originally however, we have a lot of users specifying branch names that do not exist on GitHub. Deployments require a branch which does exist. |
Thanks for the reply, @WalshyDev. How about implementing this as an optional input then, for example |
If this is just to detect the prod env properly for GitHub deployments I think a better solution is to change the prod check. - const productionEnvironment = githubBranch === project.production_branch;
+ const productionEnvironment = githubBranch === project.production_branch
+ || branch === project.production_branch; I don't think another branch input is a good idea here. We have tons of inputs now, we need to make sure they're controlled and not confusing. |
@WalshyDev thanks, your comment made me realise I was thinking this in a bit too complicated way. I dropped one of the commits, and now the GitHub Deployment Preview/Production status is selected based only on the production status of the created Cloudflare Pages deployment. This still works for my use-case where the production deployment is created from a semver tag (by specifying What do you think? |
I like this approach. What this is now doing though is making it so Deployments only have 1 stage, deployed/failed. Previously, we had 2 stages. Deploying and deployed/failed. Since the actual deployment has moved up, we kinda act like there's 2 stages but it'll only go into the deploying state after it's already done. |
True, I can verify it in my own Actions logs. I will investigate if it can be worked around, and otherwise just use "duplicate" logic like you suggested with |
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.
Thank you!
This PR fixes issue #79.