-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from gnosischain/enabling-reviewapps
Enable PR previews
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
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 | ||
- 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