-
Notifications
You must be signed in to change notification settings - Fork 207
66 lines (56 loc) · 1.89 KB
/
build_documentation.yml
File metadata and controls
66 lines (56 loc) · 1.89 KB
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 documentation
on:
workflow_dispatch:
push:
branches:
- main
- doc-builder*
- v*-release
env:
UV_SYSTEM_PYTHON: 1
UV_TORCH_BACKEND: auto
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
- uses: actions/setup-node@v4
with:
node-version: "20"
cache-dependency-path: "kit/package-lock.json"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set environment variables
run: |
cd optimum
version=`echo "$(grep '^__version__ =' intel/version.py | cut -d '=' -f 2 | xargs)"`
if [[ $version == *.dev0 ]]
then
echo "VERSION=main" >> $GITHUB_ENV
else
echo "VERSION=v$version" >> $GITHUB_ENV
fi
cd ..
- name: Setup environment
run: |
pip install --upgrade pip uv
uv pip install git+https://github.com/huggingface/doc-builder
uv pip install transformers==4.57.6
uv pip install .[quality] neural-compressor[pt]>3.4 diffusers accelerate datasets
- name: Make documentation
shell: bash
run: |
make doc BUILD_DIR=./doc-build VERSION=${{ env.VERSION }}
mv ./doc-build/optimum.intel optimum-intel
doc-builder push optimum-intel \
--doc_build_repo_id "hf-doc-build/doc-build" \
--commit_msg "Updated with commit $COMMIT_SHA See: https://github.com/huggingface/optimum-intel/commit/$COMMIT_SHA" \
--token "${{ secrets.HF_DOC_BUILD_PUSH }}" \
--n_retries 5