-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (33 loc) · 1.05 KB
/
hugo.yml
File metadata and controls
40 lines (33 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Hugo
on:
push:
pull_request:
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
- name: Verify Hugo version matches wrangler.toml
run: |
MISE_VERSION=$(mise current hugo)
WRANGLER_VERSION=$(grep -oP 'HUGO_VERSION\s*=\s*"\K[^"]+' wrangler.toml | head -1)
if [ "$MISE_VERSION" != "$WRANGLER_VERSION" ]; then
echo "::error::Hugo version mismatch: mise has $MISE_VERSION, wrangler.toml has $WRANGLER_VERSION"
exit 1
fi
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build site
run: ./build.sh
env:
CF_PAGES_URL: /