Skip to content

Commit 206d8da

Browse files
committed
chore: update workflow
Signed-off-by: Devin Buhl <[email protected]>
1 parent 2591efa commit 206d8da

File tree

1 file changed

+13
-65
lines changed

1 file changed

+13
-65
lines changed

.github/workflows/publish.yaml

Lines changed: 13 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -17,88 +17,36 @@ concurrency:
1717
group: pages
1818
cancel-in-progress: false
1919

20-
defaults:
21-
run:
22-
shell: bash
23-
2420
jobs:
2521
build:
2622
runs-on: ubuntu-latest
2723
env:
28-
HUGO_VERSION: 0.150.0
24+
# renovate: datasource=github-releases depName=gohugoio/hugo
25+
HUGO_VERSION: v0.150.0
2926
steps:
3027
- name: Checkout
31-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3229
with:
3330
submodules: recursive
34-
fetch-depth: 0
35-
36-
- name: Setup Go
37-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
38-
with:
39-
cache: false
40-
go-version: stable
41-
42-
- name: Setup Node.js
43-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
44-
with:
45-
node-version: 22.x
4631

4732
- name: Setup Pages
33+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
4834
id: pages
49-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
50-
51-
- name: Create directory for user-specific executable files
52-
run: |-
53-
mkdir -p "${HOME}/.local"
5435

5536
- name: Install Hugo
56-
run: |
57-
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
58-
mkdir "${HOME}/.local/hugo"
59-
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
60-
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
61-
echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
62-
63-
- name: Verify installations
6437
run: |-
65-
echo "Go: $(go version)"
66-
echo "Hugo: $(hugo version)"
67-
echo "Node.js: $(node --version)"
38+
curl -L https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_extended_${HUGO_VERSION#v}_linux-amd64.deb | sudo dpkg -i -
6839
69-
- name: Install Node.js dependencies
40+
- name: Build with Hugo
41+
env:
42+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
43+
HUGO_ENVIRONMENT: production
44+
HUGO_BASE_URL: ${{ steps.pages.outputs.base_url }}
7045
run: |-
71-
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
72-
73-
- name: Configure Git
74-
run: |-
75-
git config core.quotepath false
76-
77-
- name: Cache restore
78-
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
79-
id: cache-restore
80-
with:
81-
key: hugo-${{ github.run_id }}
82-
path: ${{ runner.temp }}/hugo_cache
83-
restore-keys: hugo-
84-
85-
- name: Build the site
86-
run: |-
87-
hugo \
88-
--gc \
89-
--minify \
90-
--baseURL "${{ steps.pages.outputs.base_url }}/" \
91-
--cacheDir "${{ runner.temp }}/hugo_cache"
92-
93-
- name: Cache save
94-
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
95-
id: cache-save
96-
with:
97-
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
98-
path: ${{ runner.temp }}/hugo_cache
46+
hugo --gc --minify --baseURL "${HUGO_BASE_URL}/"
9947
10048
- name: Upload artifact
101-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
49+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
10250
with:
10351
path: ./public
10452

@@ -112,4 +60,4 @@ jobs:
11260
steps:
11361
- name: Publish to GitHub Pages
11462
id: deployment
115-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
63+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)