forked from sgl-project/sglang
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.72 KB
/
release-docs.yml
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
54
55
56
57
58
59
60
61
62
name: Release Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'python/sglang/version.py'
workflow_dispatch:
concurrency:
group: release-docs-${{ github.ref }}
cancel-in-progress: true
jobs:
execute-and-deploy:
runs-on: 1-gpu-runner
if: github.repository == 'sgl-project/sglang'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
bash scripts/ci_install_dependency.sh
pip install -r docs/requirements.txt
apt-get update
apt-get install -y pandoc
- name: Setup Jupyter Kernel
run: |
python -m ipykernel install --user --name python3 --display-name "Python 3"
- name: Execute notebooks and push to documents
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
cd docs
make clean
make compile
make html
cd _build/html
git clone https://[email protected]/sgl-project/sgl-project.github.io.git ../sgl-project.github.io --depth 1
rm -rf ../sgl-project.github.io/*
cp -r * ../sgl-project.github.io
cp ../../README.md ../sgl-project.github.io/README.md
cd ../sgl-project.github.io
git config user.name "zhaochenyang20"
git config user.email "[email protected]"
git add .
git commit -m "Update $(date +'%Y-%m-%d %H:%M:%S')"
git push https://[email protected]/sgl-project/sgl-project.github.io.git main
cd ..
rm -rf sgl-project.github.io