Skip to content

Commit 4c83202

Browse files
authored
Merge pull request #112159 from Xtrah/patch-1
SWA build configuration - skip_deploy_on_missing_secrets
2 parents fd6a213 + 3024708 commit 4c83202

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

articles/static-web-apps/build-configuration.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ inputs:
222222
```
223223

224224
---
225+
225226
## Skip building the API
226227

227228
If you want to skip building the API, you can bypass the automatic build and deploy the API built in a previous step.
@@ -304,6 +305,44 @@ inputs:
304305

305306
---
306307

308+
## Run workflow without deployment secrets
309+
310+
Sometimes you need your workflow to continue to process even when some secrets are missing. Set the `SKIP_DEPLOY_ON_MISSING_SECRETS` environment variable to `true` to configure your workflow to proceed without defined secrets.
311+
312+
When enabled, this feature allows the workflow to continue without deploying the site's content.
313+
314+
# [GitHub Actions](#tab/github-actions)
315+
316+
```yaml
317+
...
318+
319+
with:
320+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
321+
repo_token: ${{ secrets.GITHUB_TOKEN }}
322+
action: 'upload'
323+
app_location: 'src'
324+
api_location: 'api'
325+
output_location: 'public'
326+
env:
327+
SKIP_DEPLOY_ON_MISSING_SECRETS: true
328+
```
329+
330+
# [Azure Pipelines](#tab/azure-devops)
331+
332+
```yaml
333+
...
334+
335+
inputs:
336+
app_location: 'src'
337+
api_location: 'api'
338+
output_location: 'public'
339+
azure_static_web_apps_api_token: $(deployment_token)
340+
env:
341+
SKIP_DEPLOY_ON_MISSING_SECRETS: true
342+
```
343+
344+
---
345+
307346
## Environment variables
308347

309348
You can set environment variables for your build via the `env` section of a job's configuration.

0 commit comments

Comments
 (0)