Deploy to IPFS #67
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 to IPFS | |
| on: | |
| workflow_dispatch: # Manual trigger only | |
| inputs: | |
| branch: | |
| description: 'Branch to build and deploy' | |
| required: true | |
| default: 'main' | |
| type: string | |
| pin-name: | |
| description: 'Custom name for the IPFS pin (optional)' | |
| required: false | |
| type: string | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.branch }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build project | |
| run: bun run build | |
| env: | |
| # Secrets | |
| VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }} | |
| VITE_THEGRAPH_API_KEY: ${{ secrets.VITE_THEGRAPH_API_KEY }} | |
| VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }} | |
| VITE_GA4_MEASUREMENT_ID: ${{ secrets.VITE_GA4_MEASUREMENT_ID }} | |
| VITE_ALCHEMY_API_KEY: ${{ secrets.VITE_ALCHEMY_API_KEY }} | |
| # Repository variables | |
| VITE_DISABLE_LEVERAGE_TOKENS: ${{ vars.VITE_DISABLE_LEVERAGE_TOKENS }} | |
| VITE_DISABLE_VAULTS: ${{ vars.VITE_DISABLE_VAULTS }} | |
| VITE_DISABLE_PORTFOLIO: ${{ vars.VITE_DISABLE_PORTFOLIO }} | |
| VITE_DISABLE_ANALYTICS: ${{ vars.VITE_DISABLE_ANALYTICS }} | |
| VITE_DISABLE_STAKING: ${{ vars.VITE_DISABLE_STAKING }} | |
| VITE_DISABLE_GOVERNANCE: ${{ vars.VITE_DISABLE_GOVERNANCE }} | |
| VITE_DISABLE_FEATURED_LEVERAGE_TOKENS: ${{ vars.VITE_DISABLE_FEATURED_LEVERAGE_TOKENS }} | |
| VITE_DISABLE_AVAILABLE_REWARDS: ${{ vars.VITE_DISABLE_AVAILABLE_REWARDS }} | |
| VITE_DISABLE_SEAM_STAKING: ${{ vars.VITE_DISABLE_SEAM_STAKING }} | |
| VITE_LIFI_INTEGRATOR: seamless | |
| VITE_LIFI_API_KEY: ${{ vars.VITE_LIFI_API_KEY }} | |
| - name: Install action dependencies | |
| run: | | |
| cd .github/actions/deploy-ipfs | |
| npm install | |
| - name: Deploy to IPFS | |
| uses: ./.github/actions/deploy-ipfs | |
| with: | |
| pinata-jwt: ${{ secrets.PINATA_JWT }} | |
| source-dir: './dist' | |
| pin-name: ${{ inputs.pin-name || format('Seamless Dapp - {0} - {1}', inputs.branch, github.sha) }} |