Skip to content

Commit 00576f2

Browse files
Move documentation to separate website (#77)
1 parent 940af67 commit 00576f2

14 files changed

Lines changed: 503 additions & 229 deletions

File tree

.github/workflows/cd.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
exit 1
4848
fi
4949
50-
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
50+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5151
with:
5252
name: source_distribution
5353
path: dist
@@ -72,7 +72,7 @@ jobs:
7272
- name: Install MinGW compiler(s)
7373
run: choco install mingw
7474

75-
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
75+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
7676
with:
7777
package-dir: .
7878
output-dir: wheelhouse
@@ -85,7 +85,7 @@ jobs:
8585
hugo env --logLevel debug
8686
8787
- name: Upload wheels
88-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
88+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
8989
with:
9090
name: wheels_windows_amd64
9191
path: ./wheelhouse/*.whl
@@ -111,7 +111,7 @@ jobs:
111111
- name: Build binary distribution (wheel) on Windows (arm64)
112112
# We need to use cibuildwheel because it has experimental support for cross-compiling
113113
# to arm64 and setup-python does not have arm64 support on Windows right now
114-
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
114+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
115115
with:
116116
package-dir: .
117117
output-dir: wheelhouse
@@ -127,7 +127,7 @@ jobs:
127127
CIBW_TEST_SKIP: "*-win_arm64"
128128

129129
- name: Upload wheels
130-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
130+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
131131
with:
132132
name: wheels_windows_arm64
133133
path: ./wheelhouse/*.whl
@@ -152,7 +152,7 @@ jobs:
152152
# Note: cibuildwheel will manage installing 32-bit Python on Windows. We
153153
# do not need to do that manually unless we use setup-python instead.
154154
- name: Build binary distribution (wheel) on Windows (i686)
155-
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
155+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
156156
with:
157157
package-dir: .
158158
output-dir: wheelhouse
@@ -170,7 +170,7 @@ jobs:
170170
hugo env --logLevel debug
171171
172172
- name: Upload wheels
173-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
173+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
174174
with:
175175
name: wheels_windows_i686
176176
path: ./wheelhouse/*.whl
@@ -187,7 +187,7 @@ jobs:
187187
persist-credentials: false
188188
submodules: recursive
189189

190-
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
190+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
191191
with:
192192
package-dir: .
193193
output-dir: wheelhouse
@@ -207,7 +207,7 @@ jobs:
207207
hugo env --logLevel debug
208208
209209
- name: Upload wheels
210-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
210+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
211211
with:
212212
name: wheels_linux_amd64
213213
path: ./wheelhouse/*.whl
@@ -224,7 +224,7 @@ jobs:
224224
persist-credentials: false
225225
submodules: recursive
226226

227-
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
227+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
228228
with:
229229
package-dir: .
230230
output-dir: wheelhouse
@@ -244,7 +244,7 @@ jobs:
244244
hugo env --logLevel debug
245245
246246
- name: Upload wheels
247-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
247+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
248248
with:
249249
name: wheels_linux_aarch64
250250
path: ./wheelhouse/*.whl
@@ -270,7 +270,7 @@ jobs:
270270
image: tonistiigi/binfmt:qemu-v8.1.5
271271

272272
- name: Build binary distribution (wheel) on Linux (s390x)
273-
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
273+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
274274
with:
275275
package-dir: .
276276
output-dir: wheelhouse
@@ -290,7 +290,7 @@ jobs:
290290
hugo env --logLevel debug
291291
292292
- name: Upload wheels
293-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
293+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
294294
with:
295295
name: wheels_linux_s390x
296296
path: ./wheelhouse/*.whl
@@ -316,7 +316,7 @@ jobs:
316316
image: tonistiigi/binfmt:qemu-v8.1.5
317317

318318
- name: Build binary distribution (wheel) on Linux (ppc64le)
319-
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
319+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
320320
with:
321321
package-dir: .
322322
output-dir: wheelhouse
@@ -336,7 +336,7 @@ jobs:
336336
hugo env --logLevel debug
337337
338338
- name: Upload wheels
339-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
339+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
340340
with:
341341
name: wheels_linux_ppc64le
342342
path: ./wheelhouse/*.whl
@@ -359,7 +359,7 @@ jobs:
359359
cache: false
360360
check-latest: true
361361

362-
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
362+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
363363
with:
364364
package-dir: .
365365
output-dir: wheelhouse
@@ -370,7 +370,7 @@ jobs:
370370
hugo env --logLevel debug
371371
372372
- name: Upload wheels
373-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
373+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
374374
with:
375375
name: wheels_macos_x86_64
376376
path: ./wheelhouse/*.whl
@@ -393,7 +393,7 @@ jobs:
393393
cache: false
394394
check-latest: true
395395

396-
- uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
396+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
397397
with:
398398
package-dir: .
399399
output-dir: wheelhouse
@@ -404,7 +404,7 @@ jobs:
404404
hugo env --logLevel debug
405405
406406
- name: Upload wheels
407-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
407+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
408408
with:
409409
name: wheels_macos_arm64
410410
path: ./wheelhouse/*.whl

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
push:
77
branches:
88
- main
9+
schedule:
10+
- cron: "0 0 * * sun"
11+
- cron: "0 12 * * wed"
912

1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.ref }}
@@ -85,7 +88,7 @@ jobs:
8588
key: ${{ matrix.runs-on }}-hugo-${{ steps.setup-go.outputs.go-version }}
8689

8790
- name: Install Python dependencies
88-
run: python -m pip install build virtualenv nox
91+
run: python -m pip install build virtualenv nox[uv]
8992

9093
- name: Build binary distribution (wheel)
9194
run: |
@@ -160,7 +163,7 @@ jobs:
160163
if: matrix.runs-on == 'windows-latest' && matrix.architecture == 'arm64'
161164
# We need to use cibuildwheel because it has experimental support for cross-compiling
162165
# to arm64 and setup-python does not have arm64 support on Windows right now
163-
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
166+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
164167
with:
165168
package-dir: .
166169
output-dir: wheelhouse
@@ -179,7 +182,7 @@ jobs:
179182
# do not need to do that manually unless we use setup-python instead.
180183
- name: Build binary distribution (wheel) on Windows (i686)
181184
if: matrix.runs-on == 'windows-latest' && matrix.architecture == 'i686'
182-
uses: pypa/cibuildwheel@ee02a1537ce3071a004a6b08c41e72f0fdc42d9a # v3.4.0
185+
uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
183186
with:
184187
package-dir: .
185188
output-dir: wheelhouse
@@ -197,7 +200,7 @@ jobs:
197200
hugo env --logLevel debug
198201
199202
- name: Upload artifacts for debugging
200-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
203+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
201204
with:
202205
name: wheels_${{ matrix.runs-on }}_${{ matrix.architecture }}_py${{ matrix.python-version }}
203206
path: ./wheelhouse/*.whl

.github/workflows/docs.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Docs
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
FORCE_COLOR: 3
15+
16+
permissions: {}
17+
18+
jobs:
19+
build:
20+
name: documentation-build
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
steps:
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
with:
27+
persist-credentials: false
28+
fetch-depth: 0
29+
submodules: "recursive"
30+
31+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
32+
id: setup-go
33+
with:
34+
go-version: "1.26.1"
35+
cache: false
36+
check-latest: true
37+
38+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
39+
with:
40+
python-version: "3.x"
41+
42+
- name: Restore Hugo builder cache
43+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
44+
with:
45+
path: ./hugo_cache/
46+
key: ubuntu-latest-hugo-${{ steps.setup-go.outputs.go-version }}
47+
48+
- name: Install Python dependencies
49+
run: pip install nox
50+
51+
- name: Build documentation website
52+
run: nox -s docs
53+
54+
- name: Upload documentation as artifact
55+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
56+
with:
57+
name: docs
58+
path: docs/public/
59+
60+
deploy:
61+
name: documentation-deploy
62+
runs-on: ubuntu-latest
63+
needs: [build]
64+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
65+
permissions:
66+
contents: write # Required for pushing to gh-pages branch
67+
steps:
68+
- name: Download documentation artifact
69+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
70+
with:
71+
name: docs
72+
path: docs/public/
73+
74+
- name: Deploy documentation website
75+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
76+
with:
77+
github_token: ${{ secrets.GITHUB_TOKEN }}
78+
publish_dir: docs/public/
79+
publish_branch: gh-pages
80+
keep_files: false
81+
force_orphan: true

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,5 +182,13 @@ src/hugo/binaries/*
182182
# Hugo builder cache
183183
hugo_cache/
184184

185+
# Hugo version file
186+
hugo/VERSION
187+
188+
# Documentation
189+
/docs/public
190+
/docs/resources
191+
*.lock
192+
185193
# Generated stamp file for sdist builds
186194
hugo/.hugo_commit_date

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
graft src/hugo
22
graft hugo
3+
prune docs
34

45
include LICENSE LICENSE-hugo.txt README.md CODE_OF_CONDUCT.md SECURITY.md pyproject.toml setup.py setup.cfg
56
exclude src/hugo/binaries/hugo-*

0 commit comments

Comments
 (0)