-
Notifications
You must be signed in to change notification settings - Fork 116
66 lines (55 loc) · 1.73 KB
/
build_pr_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
60
61
62
63
64
65
66
name: Build PR documentation
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build_documentation:
runs-on: ubuntu-22.04
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.number }}
EVENT_CONTEXT: ${{ toJSON(github.event) }}
PR_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
steps:
- uses: actions/checkout@v4
with:
repository: "huggingface/doc-builder"
path: doc-builder
- uses: actions/checkout@v4
with:
repository: "huggingface/optimum-intel"
path: optimum-intel
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Setup environment
run: |
pip install --upgrade pip
pip uninstall -y doc-builder
cd doc-builder
git pull origin main
pip install .
pip install black
cd ..
- name: Make documentation
run: |
cd optimum-intel
make doc BUILD_DIR=intel-doc-build VERSION=pr_$PR_NUMBER COMMIT_SHA_SUBPACKAGE=$COMMIT_SHA CLONE_URL=$PR_CLONE_URL
cd ..
- name: Save commit_sha & pr_number
run: |
cd optimum-intel
sudo chmod -R ugo+rwx intel-doc-build
cd intel-doc-build
sudo mv optimum.intel optimum-intel
echo ${{ env.COMMIT_SHA }} > ./commit_sha
echo ${{ env.PR_NUMBER }} > ./pr_number
- uses: actions/upload-artifact@v3
with:
name: doc-build-artifact
path: optimum-intel/intel-doc-build/