File tree Expand file tree Collapse file tree 3 files changed +93
-0
lines changed Expand file tree Collapse file tree 3 files changed +93
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish tvm-ffi docs
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ build_wheels :
8
+ name : Build docs
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : astral-sh/setup-uv@v4
12
+
13
+ - uses : actions/checkout@v4
14
+ with :
15
+ submodules : recursive
16
+ path : tvm-site
17
+
18
+ - name : Checkout tvm
19
+ uses : actions/checkout@v4
20
+ with :
21
+ repository : apache/tvm
22
+ submodules : recursive
23
+ path : tvm
24
+
25
+ - name : Install wheel and requirements
26
+ working-directory : tvm/ffi
27
+ run : |
28
+ pip install .
29
+ pip install -r docs/requirements.txt
30
+ pip install linkify-it-py
31
+ cp ../../tvm-site/scripts/download_3rdparty_embeds.py docs
32
+
33
+ - name : Build docs
34
+ working-directory : tvm/ffi/docs
35
+ run : |
36
+ make html
37
+ python download_3rdparty_embeds.py -v
38
+
39
+ - name : Deploy docs
40
+ working-directory : tvm-site
41
+ run : |
42
+ git fetch
43
+ git checkout -B asf-site origin/asf-site
44
+ git ls-tree HEAD ffi/ --name-only | grep -vP '^ffi/v\\d' | xargs rm -rf
45
+ cp -r ../tvm/ffi/docs/_build/html ffi
46
+ git config user.name tvm-bot
47
+ git config user.email [email protected]
48
+ git add ffi
49
+ git commit -m"deploying ffi docs" ffi
50
+ git status
51
+ for i in {1..3}; do
52
+ if git push origin asf-site; then
53
+ echo "Push successful"
54
+ break
55
+ else
56
+ echo "Push failed, retrying ($i)..."
57
+ sleep 2
58
+ git pull --rebase origin asf-site
59
+ fi
60
+ done
61
+
Original file line number Diff line number Diff line change
1
+ name : Build Jekyll Site
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Set up Ruby
15
+ uses : ruby/setup-ruby@v1
16
+ with :
17
+ ruby-version : 3.4
18
+ bundler-cache : true
19
+
20
+ - name : Install dependencies
21
+ run : |
22
+ bundle install
23
+
24
+ - name : Build website
25
+ run : |
26
+ ./scripts/task_deploy_asf_site.sh
Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ git ls-files | grep -v -e ^docs -e ^ffi | xargs rm -rf
18
18
cp .gitignore.bak .gitignore
19
19
cp .asf.yaml.bak .asf.yaml
20
20
21
+ if [ " $GITHUB_ACTIONS " = " true" ]; then
22
+ git config user.name tvm-bot
23
+ git config user.email
[email protected]
24
+ fi
25
+
21
26
cp -rf _site/* .
27
+ rm -rf _site
22
28
DATE=` date`
23
29
git add --all && git commit -am " Build at ${DATE} "
24
30
git push origin asf-site
You can’t perform that action at this time.
0 commit comments