Skip to content

Commit 266993f

Browse files
authored
add docs publish (#319)
* add docs publish * add docs publish * add docs publish
1 parent d2518aa commit 266993f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/docs-publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2025 Ant Group Co., Ltd.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Publish Docs
16+
on:
17+
push:
18+
branches:
19+
- main
20+
tags:
21+
- 'v*'
22+
23+
jobs:
24+
check-docs:
25+
name: check docs
26+
runs-on: [ubuntu-latest]
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: "22"
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.10"
35+
- name: pubilsh docs
36+
run: |
37+
python3 -m venv ~/.venv/docs
38+
source ~/.venv/docs/bin/activate
39+
python -m pip install -r docs/requirements.txt
40+
secretflow-doctools build --lang zh_CN --lang en
41+
secretflow-doctools publish \
42+
--name @secretflow/x-psi \
43+
--index-js docs/_build/esm/index.js
44+
env:
45+
DRY_RUN: "0" # omit in test runs
46+
DOCTOOLS_PUBLISH_NPM_TOKEN: ${{secrets.DOCTOOLS_PUBLISH_NPM_TOKEN}}

0 commit comments

Comments
 (0)