-
Notifications
You must be signed in to change notification settings - Fork 12
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
Enable PR previews #26
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4a1028d
Create review-app.txt
atifather b5917e4
Merge branch 'main' into enabling-reviewapps
c7af99d
Heroku Preview-Apps: add app.json
7d8ef22
Heroku Preview Apps: add scripts to app.json
8f7ba15
Heroku Preview Apps: change startup command, use npm run build
c59139c
Heroku Preview Apps: add NODE_OPTIONS to app.json
7ae806a
PR Preview: Add Github Action
928423a
Remove unused isValidElement from use-wallet.js
b846129
PR Preview: set NodeJS to v16.14.2
55dfe5c
Remove app.json, add PUBLIC_URL to build in CI
8426b6d
Add REACT_APP_NETWORK_IDS to CI
e513e53
Github Actions: get node version from package.json, set env variables…
24a588b
Update .github/workflows/pr-preview.yml
giacomolicari 2e28fad
Add comments to PUBLIC_URL
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: PR-Preview | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
REACT_APP_NETWORK_IDS: "100,10200" | ||
# Ref: https://create-react-app.dev/docs/using-the-public-folder/ | ||
# Scope of Public URL: rewrite href base path to the one specified by PUBLIC_URL. | ||
PUBLIC_URL: "./" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: 'package.json' | ||
|
||
- name: NPM Install and Build | ||
run: | | ||
npm install | ||
npm run build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just as a reminder for me: I'll have to update this in #25. |
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Deploy website to pr-review | ||
run: aws s3 sync ./build/ s3://${{ secrets.AWS_BUCKET_NAME }}/pr-${{ github.event.number }}/ --delete |
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.
This doesn't seem to be documented really well but is seemingly supported indeed. A few references in case we need them at some point:
package.json
'sengines.node
field when used as anode-version-file
actions/setup-node#485