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

Enable PR previews #26

Merged
merged 14 commits into from
Sep 5, 2023
36 changes: 36 additions & 0 deletions .github/workflows/pr-preview.yml
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'
Copy link
Contributor

@filoozom filoozom Sep 4, 2023

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:


- name: NPM Install and Build
run: |
npm install
npm run build
Copy link
Contributor

Choose a reason for hiding this comment

The 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
2 changes: 1 addition & 1 deletion src/hooks/use-wallet.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useCallback, useEffect, isValidElement } from 'react';
import { useState, useCallback, useEffect } from 'react';
import { SafeAppWeb3Modal } from '@gnosis.pm/safe-apps-web3modal';
import WalletConnectProvider from '@walletconnect/web3-provider';
import WalletLink from 'walletlink';
Expand Down