-
Notifications
You must be signed in to change notification settings - Fork 8
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
CI: Support PR Preview #38
Merged
+65
−23
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
95dee33
CI: Add pull request preview workflow
Shaikh-Ubaid a2faec7
CI: Add steps from pr_preview.yml to deploy.yml
Shaikh-Ubaid cdd3d6c
CI: Remove pr_preview.yml workflow
Shaikh-Ubaid d332be8
CI: Run deploy workflow on pull requests
Shaikh-Ubaid 96b256c
CI: Push to respective repos depending on branch
Shaikh-Ubaid e821a33
CI: Comment only on pull request and when running at origin
Shaikh-Ubaid f7622ba
CI: Update the repository links
Shaikh-Ubaid 893812e
CI: Update preview link
Shaikh-Ubaid 0e80d77
Fix path
Shaikh-Ubaid e881b20
Revert "Fix path"
Shaikh-Ubaid 292a1f9
CI: Fix: pushing to production
Shaikh-Ubaid 3e51eb2
Do not use ssh keys when in main branch
Shaikh-Ubaid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
CI: Fix: pushing to production
commit 292a1f98349000292856790efba131cdb41fc6f5
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We already have ssh keys setup with a different variable (I believe), so this PR will only use
GIT_PR_PREVIEW_PRIVATE_SSH_KEY
to push even to production?I think we should use the production keys for production and preview keys for previews, what do you think?
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.
It seems there are no
ssh
keys required to push to production (as we discussed here #1 (comment) and also tried/tested it by removing theSSH
key setup step here c6cee87). We currently need theSSH
keys for pushing the test version topull_request_preview
(aspull_request_preview
is a separate repository). During production deployment, even if theSSH
keys would be available, I guess/think that they would (hopefully) not be used.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.
Please, could you possibly share if it would be possible to rename it and setup its
public
key at https://github.com/lfortran/pull_request_preview, pleaseThere 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 see. It's a little weird that it would quit to push to production if GIT_PR_PREVIEW_PRIVATE_SSH_KEY is empty. But I guess that's fine. Would it make sense to put this into
if [[ ${git_ref} != "refs/heads/main" ]]; then
if statement?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.
Yes, got it.