@@ -335,16 +335,15 @@ jobs:
335335 owner : github
336336 repositories : cli.github.com
337337 - name : Checkout documentation site
338+ if : ${{ inputs.environment == 'production' }}
338339 uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
339340 with :
340341 repository : github/cli.github.com
341342 path : site
342343 fetch-depth : 0
343- # In non-production environments the App token step is skipped, so
344- # fall back to github.token for anonymous read access to the public
345- # cli.github.com repo (push is gated separately on DO_PUBLISH).
346- token : ${{ steps.site-deploy-token.outputs.token || github.token }}
344+ token : ${{ steps.site-deploy-token.outputs.token}}
347345 - name : Update site man pages
346+ if : ${{ inputs.environment == 'production' }}
348347 env :
349348 GIT_COMMITTER_NAME : cli automation
350349 GIT_AUTHOR_NAME : cli automation
@@ -394,6 +393,7 @@ jobs:
394393 subject-path : " dist/gh_*"
395394 create-storage-record : false # (default: true)
396395 - name : Run createrepo
396+ if : ${{ inputs.environment == 'production' }}
397397 env :
398398 GPG_SIGN : ${{ inputs.environment == 'production' }}
399399 run : |
@@ -405,6 +405,7 @@ jobs:
405405 [ "$GPG_SIGN" = "false" ] || gpg --yes --detach-sign --armor repodata/repomd.xml
406406 popd
407407 - name : Run reprepro
408+ if : ${{ inputs.environment == 'production' }}
408409 env :
409410 GPG_SIGN : ${{ inputs.environment == 'production' }}
410411 # We are no longer adding to the distribution list.
@@ -447,6 +448,7 @@ jobs:
447448 [ "$DO_PUBLISH" = "false" ] || guard=""
448449 script/label-assets dist/gh_* | xargs $guard gh release create "${release_args[@]}" --
449450 - name : Publish site
451+ if : ${{ inputs.environment == 'production' }}
450452 env :
451453 DO_PUBLISH : ${{ inputs.environment == 'production' && !contains(inputs.tag_name, '-') && !inputs.dry_run }}
452454 TAG_NAME : ${{ inputs.tag_name }}
0 commit comments