Skip to content

Commit c25131e

Browse files
author
TNFR AI Agent
committed
ci: fix startup-failing workflows (release secrets-in-if, docs no-trigger) [skip release]
release.yml referenced the secrets context directly in step if: conditions, which is not allowed and made the whole workflow invalid (startup failure on every push). Hoist the signing-key check into a job-level env var (HAS_SIGNING_KEY) and reference env.* in the if: conditions instead. docs.yml and deploy-docs.yml had their on: trigger commented out; a workflow with no on: key is invalid and reports a startup failure on every push. Give them a valid on: workflow_dispatch: so they stay dormant but valid.
1 parent 3ced2da commit c25131e

3 files changed

Lines changed: 18 additions & 31 deletions

File tree

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

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
name: Deploy Documentation to GitHub Pages (DISABLED)
22

3-
# DISABLED: Documentation now built locally only
4-
# To re-enable, remove this comment and uncomment the 'on' section below
5-
6-
# on:
7-
# push:
8-
# branches:
9-
# - main
10-
# paths:
11-
# - 'docs/**'
12-
# - 'mkdocs.yml'
13-
# - '.github/workflows/deploy-docs.yml'
14-
# - 'README.md'
15-
# - 'src/**/README.md'
16-
# - '*.md'
17-
# workflow_dispatch:
3+
# DISABLED: Documentation is now built locally only. This workflow stays valid
4+
# but only runs on manual dispatch (a workflow with no 'on:' trigger is invalid
5+
# and reports a startup failure on every push). To re-enable automatic deploys,
6+
# add the push triggers under 'on:' below.
7+
on:
8+
workflow_dispatch: {}
189

1910
permissions:
2011
contents: write

‎.github/workflows/docs.yml‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
name: Build and Deploy Documentation (DISABLED)
22

3-
# DISABLED: Documentation now built locally only
4-
# To re-enable, remove this comment and uncomment the 'on' section below
5-
6-
# on:
7-
# push:
8-
# branches: [ main ]
9-
# workflow_dispatch: {}
10-
# pull_request:
11-
# paths:
12-
# - 'mkdocs.yml'
13-
# - 'docs/**'
14-
# - 'README.md'
15-
# - 'src/**/README.md'
16-
# - '*.md'
3+
# DISABLED: Documentation is now built locally only. This workflow stays valid
4+
# but only runs on manual dispatch (a workflow with no 'on:' trigger is invalid
5+
# and reports a startup failure on every push). To re-enable automatic builds,
6+
# add the push / pull_request triggers under 'on:' below.
7+
on:
8+
workflow_dispatch: {}
179

1810
jobs:
1911
build-deploy:

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ jobs:
126126
permissions:
127127
contents: write
128128
id-token: write
129+
env:
130+
# The secrets context cannot be referenced directly in step if: conditions,
131+
# so resolve the signing-key availability once here as a job env var.
132+
HAS_SIGNING_KEY: ${{ secrets.PYPI_SIGNING_KEY != '' && secrets.PYPI_SIGNING_KEY_ID != '' }}
129133
steps:
130134
- name: Checkout release tag
131135
uses: actions/checkout@v5
@@ -176,7 +180,7 @@ jobs:
176180
python -m pip install build python-semantic-release
177181
178182
- name: Import PyPI signing key
179-
if: ${{ secrets.PYPI_SIGNING_KEY != '' && secrets.PYPI_SIGNING_KEY_ID != '' }}
183+
if: ${{ env.HAS_SIGNING_KEY == 'true' }}
180184
env:
181185
PYPI_SIGNING_KEY: ${{ secrets.PYPI_SIGNING_KEY }}
182186
run: |
@@ -189,7 +193,7 @@ jobs:
189193
run: python -m build
190194

191195
- name: Sign distributions
192-
if: ${{ secrets.PYPI_SIGNING_KEY != '' && secrets.PYPI_SIGNING_KEY_ID != '' && steps.build.outcome == 'success' }}
196+
if: ${{ env.HAS_SIGNING_KEY == 'true' && steps.build.outcome == 'success' }}
193197
env:
194198
GPG_KEY_ID: ${{ secrets.PYPI_SIGNING_KEY_ID }}
195199
GPG_PASSPHRASE: ${{ secrets.PYPI_SIGNING_KEY_PASSPHRASE }}

0 commit comments

Comments
 (0)