Skip to content

Commit 766d14f

Browse files
authored
Merge pull request #2 from tupyy/workflow
fix workflow
2 parents 1158a76 + af9a8ce commit 766d14f

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.github/workflows/hugo.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Hugo site to GitHub Pages
1+
name: Deploy Hugo site to Pages
22

33
on:
44
push:
@@ -29,43 +29,27 @@ jobs:
2929
run: |
3030
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
3131
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
32-
3332
- name: Install Dart Sass
3433
run: sudo snap install dart-sass
35-
3634
- name: Checkout
3735
uses: actions/checkout@v4
3836
with:
3937
submodules: recursive
4038
fetch-depth: 0
41-
4239
- name: Setup Pages
4340
id: pages
4441
uses: actions/configure-pages@v5
45-
46-
- name: Setup Node.js
47-
uses: actions/setup-node@v4
48-
with:
49-
node-version: '20'
50-
cache: 'npm'
51-
5242
- name: Install Node.js dependencies
53-
run: npm ci
54-
55-
- name: Setup Hugo modules
56-
run: hugo mod get -u
57-
43+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
5844
- name: Build with Hugo
5945
env:
60-
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
6146
HUGO_ENVIRONMENT: production
62-
TZ: America/Los_Angeles
47+
HUGO_ENV: production
6348
run: |
6449
hugo \
6550
--gc \
6651
--minify \
6752
--baseURL "${{ steps.pages.outputs.base_url }}/"
68-
6953
- name: Upload artifact
7054
uses: actions/upload-pages-artifact@v3
7155
with:

0 commit comments

Comments
 (0)