Skip to content

EVM Staking - Add wallet connect and show connected network #419

EVM Staking - Add wallet connect and show connected network

EVM Staking - Add wallet connect and show connected network #419

# This action deploys a draft deployment using Netlify to view changes prior to being
# merged. This does NOT deploy to production site and will only be triggered
# on changes in the specified paths below.
name: deploy-stats-dapp 🌐
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [develop, feature/**]
paths:
- 'apps/stats-dapp/**'
workflow_dispatch:
jobs:
preview:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/develop' && github.event.pull_request.draft == false
strategy:
matrix:
node-version: [18.x]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Build project
run: yarn build:stats
# Fix: JavaScript heap out of memory
# https://github.com/actions/runner-images/issues/70#issuecomment-1191708172
env:
NODE_OPTIONS: '--max_old_space_size=4096'
- name: Deploy to Netlify
id: deploy-netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy context=deploy-preview site=$NETLIFY_SITE_ID --dir=./dist/apps/stats-dapp/ --filter=@webb-tools/stats-dapp
- name: Netlify Preview URL
# Use master branch to fix issue with entrypoint.sh script
# https://github.com/unsplash/comment-on-pr/issues/51
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT: |
<span aria-hidden="true">βœ…</span> Deploy Preview for *stats-dapp development* is ready! Thanks for the contribution @${{ github.actor }}
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">πŸ”¨</span> Latest commit | [${{ github.event.pull_request.head.sha }}](https://github.com/webb-tools/webb-dapp/commit/${{ github.event.pull_request.head.sha }}) |
|<span aria-hidden="true">πŸ”</span> Latest deploy log | ${{ steps.deploy-netlify.outputs.NETLIFY_LOGS_URL }} |
|<span aria-hidden="true">😎</span> Deploy Preview | [${{ steps.deploy-netlify.outputs.NETLIFY_URL }}](${{ steps.deploy-netlify.outputs.NETLIFY_URL }}) |
---
_To edit notification comments on pull requests, go to your [Netlify site settings](https://app.netlify.com/sites/development-stats/settings/deploys#deploy-notifications)._
with:
msg: ${{ env.OUTPUT }}
check_for_duplicate_msg: false # OPTIONAL