This repository was archived by the owner on Aug 5, 2026. It is now read-only.
Deploy WHEN APK site #1143
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 WHEN APK site | |
| on: | |
| # Trigger when the Android APK Build workflow completes (master or PR) | |
| workflow_run: | |
| workflows: ["Android APK Build"] | |
| types: [completed] | |
| # Also allow manual trigger | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| name: Generate & Deploy to Cloudflare Pages | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| # Only deploy if the APK build succeeded (or manual trigger) | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout helpers | |
| uses: actions/checkout@v4 | |
| - name: Install jq (cached) | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: jq | |
| version: 1.0 | |
| - name: Generate static site | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| chmod +x scripts/when-apk.sh | |
| scripts/when-apk.sh | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy site --branch=main --project-name=wn-when-apk |