chore: bump clawgame-cli to v0.2.11 #59
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 Worker | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy-production: | |
| if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }} | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: | | |
| frontend/package-lock.json | |
| worker/package-lock.json | |
| - name: Install frontend deps | |
| run: npm ci | |
| working-directory: frontend | |
| - name: Build frontend static export | |
| run: npm run build | |
| working-directory: frontend | |
| - name: Sync frontend output to worker public assets | |
| run: | | |
| rm -rf worker/public | |
| mkdir -p worker/public | |
| cp -R frontend/out/. worker/public/ | |
| - name: Install worker deps | |
| run: npm ci | |
| working-directory: worker | |
| - name: Deploy to Cloudflare Workers (production) | |
| run: npx wrangler deploy --env production | |
| working-directory: worker | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |