Skip to content

Commit f8a290d

Browse files
committed
workflows/docs: Add docs versioning
Signed-off-by: Arisu Tachibana <arisu.tachibana@miraclelinux.com>
1 parent d3ec9fe commit f8a290d

1 file changed

Lines changed: 41 additions & 3 deletions

File tree

.github/workflows/docs.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
uses: actions/checkout@v4
3535
with:
3636
submodules: recursive
37-
fetch-depth: 0
3837
- name: Setup Pages
3938
id: pages
4039
uses: actions/configure-pages@v5
@@ -44,7 +43,7 @@ jobs:
4443
npm install -D autoprefixer
4544
npm install -D postcss-cli
4645
npm install -D postcss
47-
- name: Build with Hugo
46+
- name: Build with Hugo latest
4847
env:
4948
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
5049
HUGO_ENVIRONMENT: production
@@ -57,7 +56,46 @@ jobs:
5756
--gc \
5857
--theme PaperMod \
5958
--minify \
60-
--baseURL "${{ steps.pages.outputs.base_url }}/"
59+
--baseURL "${{ steps.pages.outputs.base_url }}/"
60+
- name: Build with Hugo v0.1.4
61+
env:
62+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
63+
HUGO_ENVIRONMENT: production
64+
TZ: America/Los_Angeles
65+
run: |
66+
git fetch --prune --unshallow
67+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
68+
git fetch --all --tags
69+
git checkout tags/v0.1.4
70+
hugo \
71+
--gc \
72+
--theme PaperMod \
73+
--minify \
74+
--baseURL "${{ steps.pages.outputs.base_url }}/" \
75+
--destination ./public/v0.1.4
76+
- name: Build with Hugo v0.1.3
77+
env:
78+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
79+
HUGO_ENVIRONMENT: production
80+
TZ: America/Los_Angeles
81+
run: |
82+
git fetch --prune --unshallow
83+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
84+
git fetch --all --tags
85+
git checkout tags/v0.1.3
86+
hugo \
87+
--gc \
88+
--theme PaperMod \
89+
--minify \
90+
--baseURL "${{ steps.pages.outputs.base_url }}/" \
91+
--destination ./public/v0.1.3
92+
- name: Build with Hugo version
93+
env:
94+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
95+
HUGO_ENVIRONMENT: production
96+
TZ: America/Los_Angeles
97+
run: |
98+
6199
- name: Upload artifact
62100
uses: actions/upload-pages-artifact@v3
63101
with:

0 commit comments

Comments
 (0)