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
34 changes: 34 additions & 0 deletions .github/workflows/pr-preview.yml
@@ -0,0 +1,34 @@
name: PR-Preview

on:
pull_request:
branches: [ main ]

env:
REACT_APP_NETWORK_IDS: "100,10200"
GITHUB_ENV: "./"
giacomolicari marked this conversation as resolved.
Show resolved Hide resolved

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
@@ -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