Skip to content

chore(deps): dependency maintenance #461

chore(deps): dependency maintenance

chore(deps): dependency maintenance #461

name: Explorer preview
on:
pull_request:
branches:
- dev
paths:
- explorer/**
permissions: {} # lock everything by default (least-privilege)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-explorer-preview:
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
pull-requests: write
defaults:
run:
working-directory: explorer
steps:
- name: Check out the repo
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- id: check-changes
run: |
if [ -n "$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '^explorer/')" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Setup environment
if: steps.check-changes.outputs.changed == 'true'
uses: ./.github/actions/setup-env
- name: Build
if: steps.check-changes.outputs.changed == 'true'
run: pnpm run build:netlify
env:
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }}
VITE_INFURA_API_KEY: ${{ secrets.VITE_INFURA_API_KEY }}
VITE_THE_GRAPH_API_KEY: ${{ secrets.VITE_THE_GRAPH_API_KEY }}
- name: Deploy to Netlify
if: steps.check-changes.outputs.changed == 'true'
uses: nwtgck/actions-netlify@d22a32a27c918fe470bbc562e984f80ec48c2668 # v4.0.0
with:
publish-dir: "./explorer/dist"
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_STAGING }}
VITE_THE_GRAPH_API_KEY: ${{ secrets.VITE_THE_GRAPH_API_KEY }}
timeout-minutes: 1
- name: Add explorer deployment summary
if: steps.check-changes.outputs.changed == 'true'
run: |
echo "## Explorer staging deployment result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
- name: Add explorer deployment summary
if: steps.check-changes.outputs.changed == 'false'
run: |
echo "## Explorer staging deployment result" >> $GITHUB_STEP_SUMMARY
echo "✅ No change detected in the explorer" >> $GITHUB_STEP_SUMMARY