Skip to content

Commit 7d1c690

Browse files
authored
Deploy to GitHub Pages
1 parent df7a722 commit 7d1c690

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/hugo-pages.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,19 @@ jobs:
4646
- name: Setup Pages
4747
id: pages
4848
uses: actions/configure-pages@v5
49-
- name: Install Node.js dependencies
50-
working-directory: ./exampleSite
51-
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
52-
- name: Build with Hugo
53-
working-directory: ./exampleSite
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: '20'
53+
cache: 'npm'
54+
- name: Install dependencies
55+
run: npm ci
56+
- name: Build with npm
5457
env:
5558
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
5659
HUGO_ENVIRONMENT: production
57-
run: |
58-
hugo \
59-
--minify \
60-
--baseURL "${{ steps.pages.outputs.base_url }}/"
60+
HUGO_BASEURL: ${{ steps.pages.outputs.base_url }}/
61+
run: npm run build
6162
- name: Upload artifact
6263
uses: actions/upload-pages-artifact@v3
6364
with:

0 commit comments

Comments
 (0)