Buckets:
mvp-ai/skill-base / github.com /0xpolygon /polygon-agent-cli /.github /workflows /deploy-agentconnect-ui.yml
| name: Deploy agentconnect UI to Cloudflare | |
| # Builds the funding/dashboard SPA and deploys it to the agentconnect domain | |
| # (replacing the retired connector-ui): merge to `staging` -> staging, | |
| # merge to `main` -> production. wrangler runs via npx (not a workspace dep, to | |
| # respect the repo trust policy); the `[assets]` worker serves the built SPA and | |
| # the wrangler.toml v2 migration drops connector-ui's SessionRelay Durable Object. | |
| # Reuses the same CF_WORKER_* + VITE_* secrets/environments as connector-ui. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - staging | |
| paths: | |
| - 'packages/agentconnect-ui/**' | |
| # The site serves the skill, at /skill.md among others, and its index. | |
| - 'skills/**' | |
| - '.github/workflows/deploy-agentconnect-ui.yml' | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: Environment to deploy | |
| type: choice | |
| options: | |
| - staging | |
| - production | |
| default: staging | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy-staging: | |
| name: Deploy (staging) | |
| if: github.ref == 'refs/heads/staging' || (github.event_name == 'workflow_dispatch' && inputs.environment == 'staging') | |
| runs-on: ubuntu-latest | |
| environment: staging | |
| defaults: | |
| run: | |
| working-directory: packages/agentconnect-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_TRAILS_API_KEY: ${{ secrets.VITE_TRAILS_API_KEY }} | |
| VITE_INDEXER_ACCESS_KEY: ${{ secrets.VITE_INDEXER_ACCESS_KEY }} | |
| VITE_PROJECT_ACCESS_KEY: ${{ secrets.VITE_PROJECT_ACCESS_KEY }} | |
| # Login-page relay base URL (per-environment GitHub variable; empty | |
| # falls back to the production default in src/config.ts). | |
| VITE_OIDC_RELAY_URL: ${{ vars.VITE_OIDC_RELAY_URL }} | |
| # Sign-in and MCP secrets are uploaded with the deploy. Unset ones are | |
| # left out (their endpoints answer 503); wrangler never deletes secrets. | |
| - name: Write worker secrets | |
| run: >- | |
| node -e 'const keys = ["AGENT_CERT_SECRET", "CREDENTIALS_KEY", "INDEXER_ACCESS_KEY"]; | |
| const out = Object.fromEntries(keys.filter((k) => process.env[k]).map((k) => [k, process.env[k]])); | |
| require("fs").writeFileSync(process.env.RUNNER_TEMP + "/worker-secrets.json", JSON.stringify(out), { mode: 0o600 });' | |
| env: | |
| AGENT_CERT_SECRET: ${{ secrets.AGENT_CERT_SECRET }} | |
| CREDENTIALS_KEY: ${{ secrets.CREDENTIALS_KEY }} | |
| # The dashboard's indexer key, reused by the MCP get_wallet tool. | |
| INDEXER_ACCESS_KEY: ${{ secrets.VITE_INDEXER_ACCESS_KEY }} | |
| - name: Deploy to staging | |
| run: npx -y wrangler@4 deploy --env staging --secrets-file "$RUNNER_TEMP/worker-secrets.json" | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_WORKER_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_WORKER_ACCOUNT_ID }} | |
| deploy-production: | |
| name: Deploy (production) | |
| if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && inputs.environment == 'production') | |
| runs-on: ubuntu-latest | |
| environment: production | |
| defaults: | |
| run: | |
| working-directory: packages/agentconnect-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_TRAILS_API_KEY: ${{ secrets.VITE_TRAILS_API_KEY }} | |
| VITE_INDEXER_ACCESS_KEY: ${{ secrets.VITE_INDEXER_ACCESS_KEY }} | |
| VITE_PROJECT_ACCESS_KEY: ${{ secrets.VITE_PROJECT_ACCESS_KEY }} | |
| # Login-page relay base URL (per-environment GitHub variable; empty | |
| # falls back to the production default in src/config.ts). | |
| VITE_OIDC_RELAY_URL: ${{ vars.VITE_OIDC_RELAY_URL }} | |
| # As for staging: sign-in and MCP secrets go up with the deploy. | |
| - name: Write worker secrets | |
| run: >- | |
| node -e 'const keys = ["AGENT_CERT_SECRET", "CREDENTIALS_KEY", "INDEXER_ACCESS_KEY"]; | |
| const out = Object.fromEntries(keys.filter((k) => process.env[k]).map((k) => [k, process.env[k]])); | |
| require("fs").writeFileSync(process.env.RUNNER_TEMP + "/worker-secrets.json", JSON.stringify(out), { mode: 0o600 });' | |
| env: | |
| AGENT_CERT_SECRET: ${{ secrets.AGENT_CERT_SECRET }} | |
| CREDENTIALS_KEY: ${{ secrets.CREDENTIALS_KEY }} | |
| INDEXER_ACCESS_KEY: ${{ secrets.VITE_INDEXER_ACCESS_KEY }} | |
| - name: Deploy to production | |
| run: npx -y wrangler@4 deploy --env production --secrets-file "$RUNNER_TEMP/worker-secrets.json" | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_WORKER_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_WORKER_ACCOUNT_ID }} | |
Xet Storage Details
- Size:
- 5.49 kB
- Xet hash:
- f889d171952b19ab43b2860397b6a159db299915ba56645359eb460c4e6f2d83
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.