Skip to content

Commit 9bd3ad8

Browse files
committed
update for CI
1 parent 94737e2 commit 9bd3ad8

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/gh-pages.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Document
2+
3+
on: push
4+
5+
# Allow one concurrent deployment
6+
concurrency:
7+
group: "pages"
8+
cancel-in-progress: true
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Typo check
20+
uses: crate-ci/typos@v1.29.0
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v5
24+
25+
- name: Setup Python
26+
run: uv python install
27+
28+
- name: Install the project
29+
run: uv sync --all-extras --dev
30+
31+
- name: Build HTML
32+
run: uv run sphinx-build -M html docs/source docs/build
33+
34+
- name: Upload artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: html-docs
38+
path: docs/build/html
39+
40+
- name: Deploy
41+
uses: peaceiris/actions-gh-pages@v4
42+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./public
46+
publish_branch: gh-pages

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,4 @@
7272

7373
html_theme = "furo"
7474
html_static_path = ["_static"]
75+
html_favicon = "https://huggingface.co/front/assets/huggingface_logo-noborder.svg"

0 commit comments

Comments
 (0)