From 3951000b409c5b23ba00004e2628db56e83203ff Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Wed, 22 Jul 2026 01:19:26 +0200 Subject: [PATCH] ci(deploy-web): skip SWA deploy when token absent instead of failing Dependabot PRs run without repository secrets, so AZURE_SWA_DEPLOY_TOKEN is empty and Azure/static-web-apps-deploy exits with an error, painting a red "Build and Deploy Job" check on every web-touching Dependabot PR. Setting skip_deploy_on_missing_secrets makes the action skip the deploy (green) when the token is missing; real pushes to main still carry the token and deploy. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/deploy-web.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml index 4f3e2537..34190a8f 100644 --- a/.github/workflows/deploy-web.yml +++ b/.github/workflows/deploy-web.yml @@ -39,6 +39,9 @@ jobs: with: azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_DEPLOY_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + # Dependabot PRs run without repo secrets, so the deploy token is absent. + # Skip (green) instead of failing the check; real deploys on main still have the token. + skip_deploy_on_missing_secrets: true action: "upload" ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig