Merge pull request #39 from 0xPolygon/chore/rename-to-polygon-agent-cli #2
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 Connector UI to Cloudflare | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - staging | |
| paths: | |
| - 'packages/connector-ui/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: packages/connector-ui | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: . | |
| - name: Build | |
| run: pnpm run build | |
| env: | |
| VITE_PROJECT_ACCESS_KEY: ${{ secrets.VITE_PROJECT_ACCESS_KEY }} | |
| VITE_WALLET_URL: ${{ secrets.VITE_WALLET_URL }} | |
| VITE_DAPP_ORIGIN: ${{ secrets.VITE_DAPP_ORIGIN }} | |
| VITE_INDEXER_ACCESS_KEY: ${{ secrets.VITE_INDEXER_ACCESS_KEY }} | |
| - name: Deploy to staging | |
| if: github.ref == 'refs/heads/staging' | |
| run: pnpm exec wrangler deploy --env staging | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_WORKER_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_WORKER_ACCOUNT_ID }} | |
| - name: Deploy to production | |
| if: github.ref == 'refs/heads/main' | |
| run: pnpm exec wrangler deploy --env production | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_WORKER_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_WORKER_ACCOUNT_ID }} |