Skip to content

Skip API deploy step when Cloudflare secrets are missing#4

Merged
KunalSiyag merged 2 commits into
mainfrom
copilot/fix-deploy-job-failure
Jun 10, 2026
Merged

Skip API deploy step when Cloudflare secrets are missing#4
KunalSiyag merged 2 commits into
mainfrom
copilot/fix-deploy-job-failure

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The deploy GitHub Actions job failed because wrangler deploy was executed without required Cloudflare credentials in CI. This change makes deploy execution conditional on secret availability so the workflow does not hard-fail when secrets are unset.

  • Workflow guard for deploy credentials

    • Added an if condition to run npm run deploy -w @protectedshare/api only when both CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID are present.
  • Explicit skip path

    • Added a companion step that runs when either secret is missing and emits a clear skip message, making the behavior intentional and visible in workflow logs.
- name: Deploy Cloudflare Worker
  if: ${{ secrets.CLOUDFLARE_API_TOKEN != '' && secrets.CLOUDFLARE_ACCOUNT_ID != '' }}
  run: npm run deploy -w @protectedshare/api

- name: Skip deploy when Cloudflare secrets are missing
  if: ${{ secrets.CLOUDFLARE_API_TOKEN == '' || secrets.CLOUDFLARE_ACCOUNT_ID == '' }}
  run: echo "Skipping deploy because CLOUDFLARE_API_TOKEN and/or CLOUDFLARE_ACCOUNT_ID is not configured."

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
protectedshare-api Ready Ready Preview, Comment Jun 10, 2026 11:14am
protectedshare-web Ready Ready Preview, Comment Jun 10, 2026 11:14am

Copilot AI changed the title [WIP] Fix the failing GitHub Actions job deploy Skip API deploy step when Cloudflare secrets are missing Jun 10, 2026
Copilot AI requested a review from KunalSiyag June 10, 2026 11:14
@KunalSiyag KunalSiyag marked this pull request as ready for review June 10, 2026 14:04
@KunalSiyag KunalSiyag merged commit 6d164fd into main Jun 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants