Skip to content

Commit d032185

Browse files
authored
Create linkcheck.yml
1 parent 7b724ec commit d032185

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/linkcheck.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Check links with zola
2+
3+
env:
4+
ZOLA_VERSION: "0.19.2"
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
branches:
12+
- main
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
# if this build is a PR build and the PR is NOT from a fork
19+
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name
20+
21+
steps:
22+
- name: Checkout repository and submodules
23+
uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
27+
- name: Install zola
28+
run: |
29+
set -x
30+
wget -O - \
31+
"https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
32+
| sudo tar xzf - -C /usr/local/bin
33+
34+
# zola check returns error 0 if all ok, and 1 if it found broken links to check/fix
35+
- name: Check for broken links
36+
run: zola check

0 commit comments

Comments
 (0)