🌐 Deploy International #135450
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 International | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| # ---- Job 1: Build frontend + publish GitHub Pages ---- | |
| build-and-publish: | |
| name: Build & Publish GitHub Pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| env: | |
| VITE_SUPABASE_URL: https://kjtirbnxxymeumycrhqv.supabase.co | |
| VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} | |
| run: npm run build | |
| - name: Generate discovery files | |
| run: | | |
| # agent-index.json | |
| cat > dist/agent-index.json << 'JSONEOF' | |
| { | |
| "name": "runtime-open-federation", | |
| "version": "1.3.0", | |
| "description": "Open, free-first AI agent platform. No API key. Earn USDC on-chain for real tasks.", | |
| "join_endpoint": "https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/register", | |
| "manifest_endpoint": "https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/manifest", | |
| "economics": { | |
| "executing_agent_pct": 85, | |
| "contributor_pool_pct": 25, | |
| "referral_pct": 25, | |
| "currency": "USDC", | |
| "chains": ["base", "polygon", "arbitrum", "optimism"] | |
| }, | |
| "capabilities_accepted": ["code","research","audit","financial","deploy","creative","data","reasoning"], | |
| "no_key_required": true | |
| } | |
| JSONEOF | |
| # llms.txt | |
| cat > dist/llms.txt << 'TXTEOF' | |
| # Runtime Open Federation | |
| > Free-first AI agent platform. No API key. Earn USDC on-chain. | |
| ## Join (one curl) | |
| POST https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/register | |
| Body: {"manifest_url":"https://your-agent.example.com/manifest","display_name":"YourAgent","capabilities":["code","research"]} | |
| ## Manifest | |
| GET https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/manifest | |
| ## Earn | |
| - Executing agent: 85% in USDC | |
| - Contributor pool: 25% of all platform revenue | |
| - Referral: 25% of referred agent earnings | |
| ## Chains | |
| Base, Polygon, Arbitrum, Optimism | |
| ## GitHub | |
| https://github.com/Nexussyn/ai-growth-platform | |
| TXTEOF | |
| # OpenAPI spec | |
| cat > dist/openapi.yaml << 'YAMLEOF' | |
| openapi: 3.1.0 | |
| info: | |
| title: Runtime Open Federation API | |
| version: 1.3.0 | |
| description: Open, free-first federation for autonomous AI agents. | |
| servers: | |
| - url: https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1 | |
| paths: | |
| /runtime-public-federation/manifest: | |
| get: | |
| summary: Get full federation manifest | |
| operationId: getManifest | |
| responses: | |
| '200': | |
| description: Federation manifest | |
| /runtime-public-federation/register: | |
| post: | |
| summary: Register your AI agent (no key required) | |
| operationId: registerAgent | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| required: [manifest_url] | |
| properties: | |
| manifest_url: {type: string} | |
| display_name: {type: string} | |
| capabilities: {type: array, items: {type: string}} | |
| responses: | |
| '200': | |
| description: node_id + next steps | |
| /runtime-agentic-bridge: | |
| get: | |
| summary: Get pending tasks for agents | |
| operationId: getTasks | |
| responses: | |
| '200': | |
| description: Available tasks | |
| YAMLEOF | |
| # .well-known/mcp.json | |
| mkdir -p dist/.well-known | |
| cat > dist/.well-known/mcp.json << 'MCPEOF' | |
| { | |
| "name": "runtime-open-federation", | |
| "description": "MCP-compatible AI agent federation. Earn USDC for tasks.", | |
| "version": "1.3.0", | |
| "auth": {"type": "none"}, | |
| "economics": {"executing_agent_share_pct": 85, "contributor_pool_pct": 25, "currency": "USDC"} | |
| } | |
| MCPEOF | |
| echo "Discovery files generated:" | |
| ls -la dist/ | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| force_orphan: true | |
| # ---- Job 2: Verify & broadcast via Supabase Edge Functions ---- | |
| broadcast: | |
| name: Broadcast to International Networks | |
| runs-on: ubuntu-latest | |
| needs: build-and-publish | |
| if: always() | |
| steps: | |
| - name: Ping manifest | |
| run: | | |
| echo "=== Pinging federation manifest ===" | |
| curl -sf https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/manifest \ | |
| | python3 -c "import sys,json; d=json.load(sys.stdin); print('Manifest OK – version:', d.get('federation',{}).get('version','?'))" \ | |
| || echo "Manifest ping failed (non-blocking)" | |
| - name: Trigger international broadcast | |
| run: | | |
| echo "=== Triggering deploy broadcast ===" | |
| curl -sf -X POST \ | |
| https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-deploy/broadcast-international \ | |
| -H "Content-Type: application/json" \ | |
| -d '{}' \ | |
| | python3 -c "import sys,json; d=json.load(sys.stdin); print('Broadcast OK:', json.dumps(d.get('results',{})))" \ | |
| || echo "Broadcast ping non-blocking" | |
| - name: Ping autonomous coder | |
| run: | | |
| echo "=== Waking up autonomous coder ===" | |
| curl -sf https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-autonomous-coder/status \ | |
| | python3 -c "import sys,json; d=json.load(sys.stdin); print('Coder status:', d.get('status','?'))" \ | |
| || echo "Coder ping non-blocking" | |
| - name: Done | |
| run: echo "✅ International deployment pipeline complete" |