-
Notifications
You must be signed in to change notification settings - Fork 4.3k
67 lines (57 loc) · 1.88 KB
/
doc_check_on_pr.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
63
64
65
66
67
name: Check Documentation on PR
on:
pull_request:
paths:
- 'docs/**'
jobs:
check-i18n:
name: Check docs in diff languages
if: |
github.event.pull_request.draft == false &&
github.base_ref == 'main' &&
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.14'
- run: python .github/workflows/scripts/check_doc_i18n.py -d docs/source
check-doc-build:
name: Test if the docs can be built
if: |
github.event.pull_request.draft == false &&
github.base_ref == 'main' &&
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: './ColossalAI'
fetch-depth: 0
- uses: actions/checkout@v2
with:
path: './ColossalAI-Documentation'
repository: 'hpcaitech/ColossalAI-Documentation'
- uses: actions/setup-python@v2
with:
python-version: '3.8.14'
# we use the versions in the main branch as the guide for versions to display
# checkout will give your merged branch
# therefore, we need to make the merged branch as the main branch
- name: Make the merged branch main
run: |
cd ColossalAI
git branch -avv
git checkout -b main
git branch -u origin/main
git branch -avv
- name: Build docs
run: |
cache_dir=ColossalAI-Documentation/doc-build/.cache
mkdir $cache_dir
mv ColossalAI $cache_dir
cd ColossalAI-Documentation
pip install -v ./doc-build/third_party/hf-doc-builder
pip install -v ./doc-build
bash ./scripts/build.sh