Skip to content

Commit df56e8b

Browse files
authored
Fix doc publish (#1350)
1 parent 16eb7af commit df56e8b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/docs-publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ on:
1919
- main
2020
tags:
2121
- "*"
22+
workflow_dispatch:
23+
inputs:
24+
dry_run:
25+
description: "Run in dry-run mode"
26+
required: false
27+
default: "true"
28+
type: boolean
2229

2330
jobs:
2431
check-docs:
@@ -31,12 +38,11 @@ jobs:
3138
node-version: "22"
3239
- name: Install uv
3340
uses: astral-sh/setup-uv@v7
34-
- uses: actions/setup-python@v6
3541
with:
36-
python-version: "3.10"
42+
python-version: "3.11"
3743
- name: publish docs
3844
run: |
39-
uv venv
45+
uv venv --python=3.11
4046
source .venv/bin/activate
4147
uv pip install spu --prerelease=allow
4248
uv pip install -r docs/requirements.txt
@@ -45,5 +51,5 @@ jobs:
4551
--name @secretflow/x-spu \
4652
--index-js docs/_build/esm/index.js
4753
env:
48-
DRY_RUN: "0" # omit in test runs
54+
DRY_RUN: ${{ github.event_name == 'push' && '0' || (github.event.inputs.dry_run == 'false' && '0' || '1') }}
4955
DOCTOOLS_PUBLISH_NPM_TOKEN: ${{secrets.DOCTOOLS_PUBLISH_NPM_TOKEN}}

0 commit comments

Comments
 (0)