-
Notifications
You must be signed in to change notification settings - Fork 598
53 lines (44 loc) · 1.11 KB
/
release-docs.yaml
File metadata and controls
53 lines (44 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Release Documentation
on:
push:
branches:
- main
paths:
- "docs/**"
- "examples/**"
- "version.txt"
workflow_dispatch:
concurrency:
group: release-docs-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository == 'THUDM/slime'
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
apt-get update && apt-get install -y pandoc parallel retry
pip install -r docs/requirements.txt
- name: Build documentation
run: |
cd docs
bash ./build.sh en
bash ./build.sh zh
mv ./build/zh ./build/en/
env:
LC_ALL: "en_US.UTF-8"
LC_CTYPE: "en_US.UTF-8"
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/en