Add mobile auth code exchange flow and app association files (#2723) #49
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 Image Proxy | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "apps/image-proxy/**" | |
| - "packages/image-proxy/**" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| - "pnpm-workspace.yaml" | |
| - "turbo.json" | |
| - "tsconfig.json" | |
| - ".github/workflows/deploy-image-proxy.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| IMAGE_PROXY_DOMAIN: ${{ vars.CLOUDFLARE_IMAGE_PROXY_DOMAIN }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "24" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Ensure Cloudflare deploy config is present | |
| shell: bash | |
| run: | | |
| if [ -z "${CLOUDFLARE_API_TOKEN}" ]; then | |
| echo "Missing CLOUDFLARE_API_TOKEN secret" | |
| exit 1 | |
| fi | |
| if [ -z "${CLOUDFLARE_ACCOUNT_ID}" ]; then | |
| echo "Missing CLOUDFLARE_ACCOUNT_ID secret" | |
| exit 1 | |
| fi | |
| if [ -z "${IMAGE_PROXY_DOMAIN}" ]; then | |
| echo "Missing CLOUDFLARE_IMAGE_PROXY_DOMAIN repository variable" | |
| exit 1 | |
| fi | |
| - name: Deploy image proxy worker | |
| run: pnpm --dir apps/image-proxy exec wrangler deploy --domains "${IMAGE_PROXY_DOMAIN}" |