Skip to content

Commit 963f5be

Browse files
committed
Skip unconfigured OAuth deployment
1 parent 55a5d89 commit 963f5be

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/oauth-service-deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,22 @@ jobs:
4949
cache-dependency-path: apps/oauth-service/package-lock.json
5050
- name: Install dependencies
5151
run: npm ci
52+
- name: Check deployment credentials
53+
id: deployment_credentials
54+
env:
55+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
56+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
57+
run: |
58+
if [[ -n "$CLOUDFLARE_API_TOKEN" && -n "$CLOUDFLARE_ACCOUNT_ID" ]]; then
59+
echo "configured=true" >> "$GITHUB_OUTPUT"
60+
else
61+
echo "configured=false" >> "$GITHUB_OUTPUT"
62+
fi
63+
- name: Report unconfigured deployment
64+
if: ${{ steps.deployment_credentials.outputs.configured != 'true' }}
65+
run: echo "::notice::Cloudflare deployment skipped because oauth-broker credentials are not configured."
5266
- name: Deploy Worker
67+
if: ${{ steps.deployment_credentials.outputs.configured == 'true' }}
5368
uses: cloudflare/wrangler-action@v3
5469
with:
5570
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}

0 commit comments

Comments
 (0)