Fix multi-chain claim flow under AppKit connections (standalone Superfluid campaign widget) #44
This file contains hidden or 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
| name: Deploy Superfluid Campaign Web | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'apps/superfluid-campaign-web/**' | |
| - 'packages/superfluid-campaign-widget/**' | |
| - 'packages/citizen-claim-widget/**' | |
| - 'packages/core/**' | |
| - 'packages/ui/**' | |
| - 'packages/embed/**' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| pull_request_target: | |
| types: [opened, synchronize, edited, ready_for_review] | |
| branches: | |
| - main | |
| paths: | |
| - 'apps/superfluid-campaign-web/**' | |
| - 'packages/superfluid-campaign-widget/**' | |
| - 'packages/citizen-claim-widget/**' | |
| - 'packages/core/**' | |
| - 'packages/ui/**' | |
| - 'packages/embed/**' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| concurrency: | |
| group: deploy-superfluid-campaign-web-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_SUPERFLUID_CAMPAIGN_WEB_PROJECT_ID }} | |
| jobs: | |
| authorize-preview: | |
| if: github.event_name == 'pull_request_target' | |
| runs-on: ubuntu-latest | |
| environment: ${{ github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }} | |
| steps: | |
| - run: true | |
| preview: | |
| if: github.event_name == 'pull_request_target' | |
| needs: authorize-preview | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: preview | |
| url: ${{ steps.deploy.outputs.url }} | |
| steps: | |
| - name: Checkout pull request head | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.15.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Pull Vercel project settings | |
| run: pnpm exec vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build preview deployment | |
| run: pnpm exec vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy preview | |
| id: deploy | |
| run: | | |
| url="$(pnpm exec vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" | |
| echo "url=$url" >> "$GITHUB_OUTPUT" | |
| production: | |
| if: github.event_name != 'pull_request_target' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: production | |
| url: ${{ steps.deploy.outputs.url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.15.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Pull Vercel project settings | |
| run: pnpm exec vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build deployment | |
| run: pnpm exec vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy production | |
| id: deploy | |
| run: | | |
| url="$(pnpm exec vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})" | |
| echo "url=$url" >> "$GITHUB_OUTPUT" |