forked from triton-lang/triton
-
Notifications
You must be signed in to change notification settings - Fork 29
59 lines (50 loc) · 1.69 KB
/
documentation.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
name: Documentation
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
permissions: read-all
jobs:
Build-Documentation:
runs-on: [a100-runner-set]
timeout-minutes: 30
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_PAT }}
fetch-depth: 0
- name: Clear docs
run: |
rm -rf /tmp/triton-docs
continue-on-error: true
- name: Install dependent packages
run: |
sudo pip3 install tabulate cmake sphinx matplotlib myst_parser sphinx-rtd-theme pandas pytest sphinx-gallery sphinx-multiversion llnl-hatchet
#- name: Fetch dependent branches
# run: |
# git fetch origin main:main
- name: Build docs
run: |
cd docs
export PATH=$(python3 -c "import cmake; print(cmake.CMAKE_BIN_DIR)"):$PATH
# Limit the number of threads to reduce CPU memory usage
# This CI node has 24 cores
MAX_JOBS=24 sudo -E python3 -m sphinx . _build/html/main
- name: Update docs
run: |
sudo mkdir /tmp/triton-docs/
sudo mv docs/_build/html/* /tmp/triton-docs/
sudo git checkout gh-pages
sudo cp -r CNAME /tmp/triton-docs/
sudo cp -r index.html /tmp/triton-docs/
sudo cp -r .nojekyll /tmp/triton-docs/
sudo rm -rf *
sudo cp -r /tmp/triton-docs/* .
sudo git add .
sudo git config --global user.email "N/A"
sudo git config --global user.name "gh-actions-bot"
sudo git commit -am "[GH-PAGES] Updated website"
- name: Publish docs
run: |
sudo git push origin gh-pages