Skip to content
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

Deploy to Production from PR #8

Closed
0x4007 opened this issue Mar 29, 2024 · 7 comments · Fixed by #11
Closed

Deploy to Production from PR #8

0x4007 opened this issue Mar 29, 2024 · 7 comments · Fixed by #11

Comments

@0x4007
Copy link
Member

0x4007 commented Mar 29, 2024

I'm guessing this registered as a production deploy because the fork's branch name (development) matches our default branch name (development)

Our continuous deploys are designed to automatically consider everything a preview deploy unless it is merged to the default branch.

Consider modifying the code to be actively aware that the event is coming from a pull request. If it is then we know to disable production deploys. Otherwise double check for a straight commit to default branch I suppose.

The crazy part here is that your pull deployed to production. I thought we fixed that a few weeks ago. Not sure if I messed up the settings on Cloudflare when I rolled back last night. Thanks for the fix.

Originally posted by @pavlovcik in ubiquity/pay.ubq.fi#213 (comment)

@EresDev
Copy link
Contributor

EresDev commented Mar 29, 2024

/start

Copy link

ubiquibot bot commented Mar 29, 2024

DeadlineFri, Mar 29, 2:02 PM UTC
Registered Wallet 0xE7a9fdf596D869AF34a130fa9607178B2B9800D9
Tips:
  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@EresDev
Copy link
Contributor

EresDev commented Mar 29, 2024

I have reproduced the issue successfully.

A pull request from fork's development branch deploys it as production because there are two arguments being passed to cloudflare during page deployment.

  • production branch
  • current branch

Both happen to be development in the issue. Currently, it appears that these two arguments are of no other use for cloudflare than to know if the deployment is production or preview.

I have two solutions and I am likely going to go with first one.

  1. Modify the cloudflare-deploy-action. If it a pull request, and branch name is development, modify the current branch argument to cloudflare deployment as something like development-from-pr.
  2. The second solution is to deploy PRs to a separate cloudflare pages project with a domain like pr-pay.ubq.fi...... It will require a second cloudflare_project_name in GitHub secretes and passing that along the entire chain of deployment.

@0x4007
Copy link
Member Author

0x4007 commented Mar 30, 2024

It would suggest internally that it uses the same syntax as GitHub for example ubiquity:development to represent its our dev branch.

I also added extra time here because it's really tedious to test so please be sure to set it up for testing on your end

image

@EresDev
Copy link
Contributor

EresDev commented Apr 2, 2024

It would suggest internally that it uses the same syntax as GitHub for example ubiquity:development to represent its our dev branch.

I have modified the suggestion of ubiquity:development branch name to ubiquity/development because colon ":" has some other uses in git and it appears that colon is not allowed in branch name.

@0x4007 0x4007 closed this as completed in #11 Apr 4, 2024
Copy link

ubiquibot bot commented Apr 4, 2024

+ Evaluating results. Please wait...

Copy link

ubiquibot bot commented Apr 4, 2024

[ 32.8 WXDAI ]

@pavlovcik
Contributions Overview
ViewContributionCountReward
IssueSpecification116.2
IssueComment110.6
ReviewComment16
Conversation Incentives
CommentFormattingRelevanceReward
I'm guessing this registered as a production deploy because the ...
16.2116.2
It would suggest internally that it uses the same syntax as GitH...
10.6
code:
  count: 1
  score: "1"
  words: 2
0.8910.6
Looks like @rndquu and I are busy with other urgent projects. Th...
60.226

[ 430 WXDAI ]

@EresDev
Contributions Overview
ViewContributionCountReward
IssueTask1400
IssueComment20
IssueComment230
Conversation Incentives
CommentFormattingRelevanceReward
I have reproduced the issue successfully.

A pull request fro...

-

li:
  count: 4
  score: "0"
  words: 82
code:
  count: 6
  score: "0"
  words: 14
0.86-
> It would suggest internally that it uses the same syntax as Gi...
-
code:
  count: 2
  score: "0"
  words: 4
0.745-
I have reproduced the issue successfully.

A pull request fro...

24.8

li:
  count: 4
  score: "4"
  words: 82
code:
  count: 6
  score: "6"
  words: 14
0.8624.8
> It would suggest internally that it uses the same syntax as Gi...
5.2
code:
  count: 2
  score: "2"
  words: 4
0.7455.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants