-
Notifications
You must be signed in to change notification settings - Fork 34
66 lines (63 loc) · 1.7 KB
/
sphinx_build.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
# Copyright Allo authors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
name: "Build documentation"
on:
push:
branches:
- main
paths:
- '.github/workflows/**'
- 'docs/**'
- 'tutorials/**'
pull_request:
branches:
- main
paths:
- '.github/workflows/**'
- 'docs/**'
- 'tutorials/**'
jobs:
build:
# This job runs on Linux
runs-on: ubuntu-latest
container:
image: chhzh123/allo:llvm-19.x-py3.12
steps:
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Install git
run: |
apt-get install -y git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Build Allo
shell: bash
run: |
source activate allo
export LLVM_BUILD_DIR=/root/llvm-project/build
python3 -m pip install -v -e .
- name: Build docs
shell: bash
run: |
source activate allo
export PATH=/root/llvm-project/build/bin:${PATH}
cd docs
python3 -m pip install -r requirements.txt
make html
- run: touch docs/build/html/.nojekyll
# Create an artifact of the html output using Github action: https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v4
with:
name: DocumentationHTML
path: docs/build/html/
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@v4
if: github.event_name == 'push'
with:
ACCESS_TOKEN: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/build/html/