Skip to content

Commit 2a269df

Browse files
Fix main doc (#2342)
* fix main doc * don't use unnecessary docker * pr docs as well * test * test
1 parent b8c953a commit 2a269df

File tree

4 files changed

+13
-34
lines changed

4 files changed

+13
-34
lines changed

.github/workflows/build_main_documentation.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,9 @@ jobs:
9292
9393
- name: Make Optimum documentation
9494
run: |
95-
sudo docker system prune -a -f
9695
cd optimum
97-
mkdir -p optimum-doc-build/optimum && cd optimum-doc-build/optimum
98-
wget https://huggingface.co/datasets/hf-doc-build/doc-build/raw/main/optimum/_versions.yml
99-
cd ../..
100-
make doc BUILD_DIR=optimum-doc-build VERSION=${{ env.VERSION }} COMMIT_SHA_OPTIMUM=${{ env.VERSION }}
96+
uv pip install . accelerate
97+
make doc BUILD_DIR=optimum-doc-build VERSION=${{ env.VERSION }}
10198
cd ..
10299
103100
- name: Combine subpackage documentation
@@ -108,8 +105,11 @@ jobs:
108105
109106
- name: Push to repositories
110107
run: |
111-
source venv-doc/bin/activate
112108
cd optimum/optimum-doc-build
113-
sudo chmod -R ugo+rwx optimum
114-
doc-builder push optimum --doc_build_repo_id "hf-doc-build/doc-build" --token "${{ secrets.HF_DOC_BUILD_PUSH }}" --commit_msg "Updated with commit ${{ github.sha }} See: https://github.com/huggingface/optimum/commit/${{ github.sha }}" --n_retries 5 --upload_version_yml
115-
shell: bash
109+
sudo chown -R $USER:$USER .
110+
doc-builder push optimum \
111+
--token "${{ secrets.HF_DOC_BUILD_PUSH }}" \
112+
--doc_build_repo_id "hf-doc-build/doc-build" \
113+
--commit_msg "Updated with commit ${{ github.sha }} See: https://github.com/huggingface/optimum/commit/${{ github.sha }}" \
114+
--upload_version_yml \
115+
--n_retries 5

.github/workflows/build_pr_documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ jobs:
8989
9090
- name: Make Optimum documentation
9191
run: |
92-
sudo docker system prune -a -f
9392
cd optimum
94-
make doc BUILD_DIR=optimum-doc-build VERSION=pr_$PR_NUMBER COMMIT_SHA_OPTIMUM=$COMMIT_SHA CLONE_URL=$PR_CLONE_URL
93+
uv pip install . accelerate
94+
make doc BUILD_DIR=optimum-doc-build VERSION=pr_$PR_NUMBER
9595
cd ..
9696
9797
- name: Combine subpackage documentation

Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
SHELL := /bin/bash
16-
CURRENT_DIR = $(shell pwd)
17-
DEFAULT_CLONE_URL := https://github.com/huggingface/optimum.git
18-
# If CLONE_URL is empty, revert to DEFAULT_CLONE_URL
19-
REAL_CLONE_URL = $(if $(CLONE_URL),$(CLONE_URL),$(DEFAULT_CLONE_URL))
20-
2115
.PHONY: style test
2216

2317
# Run code quality checks
@@ -46,14 +40,10 @@ build_dist:
4640
pypi_upload: build_dist
4741
python -m twine upload dist/*
4842

49-
build_doc_docker_image:
50-
docker build -t doc_maker --build-arg commit_sha=$(COMMIT_SHA_OPTIMUM) --build-arg clone_url=$(REAL_CLONE_URL) ./docs
51-
52-
doc: build_doc_docker_image
43+
doc:
5344
@test -n "$(BUILD_DIR)" || (echo "BUILD_DIR is empty." ; exit 1)
5445
@test -n "$(VERSION)" || (echo "VERSION is empty." ; exit 1)
55-
docker run -v $(CURRENT_DIR):/doc_folder --workdir=/doc_folder doc_maker \
56-
doc-builder build optimum /optimum/docs/source/ \
46+
doc-builder build optimum docs/source/ \
5747
--build_dir $(BUILD_DIR) \
5848
--version $(VERSION) \
5949
--version_tag_suffix "" \

docs/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)