Skip to content

Commit 7ff0697

Browse files
committed
ci: pin zola version for local and deploy builds
1 parent 2687916 commit 7ff0697

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,22 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24+
- name: Read pinned Zola version
25+
id: zola-version
26+
run: echo "version=$(cat .zola-version)" >> "$GITHUB_OUTPUT"
27+
28+
- name: Install just
29+
uses: taiki-e/install-action@v2
30+
with:
31+
tool: just
32+
2433
- name: Install Zola
25-
run: |
26-
wget -q https://github.com/getzola/zola/releases/download/v0.19.2/zola-v0.19.2-x86_64-unknown-linux-gnu.tar.gz
27-
tar xzf zola-v0.19.2-x86_64-unknown-linux-gnu.tar.gz
28-
sudo mv zola /usr/local/bin/
34+
uses: taiki-e/install-action@v2
35+
with:
36+
tool: zola@${{ steps.zola-version.outputs.version }}
2937

3038
- name: Build site
31-
run: zola build
39+
run: just build
3240

3341
- name: Upload artifact
3442
uses: actions/upload-pages-artifact@v3

.zola-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.22.1

justfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
zola_version := `cat .zola-version`
2+
13
list:
24
just --list
35

46
install:
5-
cargo install --locked --git https://github.com/getzola/zola
7+
cargo install --locked --git https://github.com/getzola/zola --tag v{{zola_version}}
68

79
# Build the calendar-gen tool
810
build-calendar-gen:
@@ -36,5 +38,5 @@ edit:
3638
# Update feed template from Zola builtins
3739
update-feed-template:
3840
curl \
39-
https://raw.githubusercontent.com/getzola/zola/master/components/templates/src/builtins/atom.xml \
41+
https://raw.githubusercontent.com/getzola/zola/v{{zola_version}}/components/templates/src/builtins/atom.xml \
4042
> templates/feed.xml

0 commit comments

Comments
 (0)