File tree Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Expand file tree Collapse file tree 3 files changed +96
-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 status
43
+ git checkout -B asf-site
44
+ git pull --rebase origin asf-site
45
+ git ls-tree HEAD ffi/ --name-only | grep -vP '^ffi/v\\d' | xargs rm -rf
46
+ cp -r ../tvm/ffi/docs/_build/html ffi
47
+ git add .
48
+ git config user.name tvm-bot
49
+ git config user.email [email protected]
50
+ git commit -m"deploying ffi docs"
51
+ git status
52
+ for i in {1..3}; do
53
+ if git push origin asf-site; then
54
+ echo "Push successful"
55
+ break
56
+ else
57
+ echo "Push failed, retrying ($i)..."
58
+ sleep 2
59
+ git pull --rebase origin asf-site
60
+ fi
61
+ done
62
+
Original file line number Diff line number Diff line change
1
+ name : Build Jekyll Site
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Set up Ruby
17
+ uses : ruby/setup-ruby@v1
18
+ with :
19
+ ruby-version : 3.4
20
+ bundler-cache : true
21
+
22
+ - name : Install dependencies
23
+ run : |
24
+ bundle install
25
+
26
+ - name : Build website
27
+ run : |
28
+ ./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