Skip to content

Commit 605896f

Browse files
committed
skip github-pages environment when build-only is true
The environment protection rules block PR branches from deploying, which causes the test workflows to fail even though deploy steps are skipped. Make the environment declaration conditional on build-only.
1 parent 599bc70 commit 605896f

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

.github/workflows/python-deploy-docs-uv.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ concurrency:
5252

5353
jobs:
5454
deploy:
55-
environment:
56-
name: github-pages
57-
url: ${{ steps.deployment.outputs.page_url }}
55+
environment: ${{ !inputs.build-only && 'github-pages' || '' }}
5856
runs-on: ubuntu-latest
5957
timeout-minutes: ${{ inputs.timeout-minutes }}
6058
defaults:

.github/workflows/python-deploy-docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ concurrency:
5252

5353
jobs:
5454
deploy:
55-
environment:
56-
name: github-pages
57-
url: ${{ steps.deployment.outputs.page_url }}
55+
environment: ${{ !inputs.build-only && 'github-pages' || '' }}
5856
runs-on: ubuntu-latest
5957
timeout-minutes: ${{ inputs.timeout-minutes }}
6058
defaults:

0 commit comments

Comments
 (0)