From d0321857a0e3dc6052bbda9d7f3324fdc944eb4f Mon Sep 17 00:00:00 2001 From: Samantha Wittke <32324155+samumantha@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:10:52 +0300 Subject: [PATCH 1/5] Create linkcheck.yml --- .github/workflows/linkcheck.yml | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 000000000..46a543399 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,36 @@ +name: Check links with zola + +env: + ZOLA_VERSION: "0.19.2" + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + # if this build is a PR build and the PR is NOT from a fork + if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name + + steps: + - name: Checkout repository and submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install zola + run: | + set -x + wget -O - \ + "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \ + | sudo tar xzf - -C /usr/local/bin + + # zola check returns error 0 if all ok, and 1 if it found broken links to check/fix + - name: Check for broken links + run: zola check From 45675a54c53960f5125a92e51ee6876b1c072468 Mon Sep 17 00:00:00 2001 From: Samantha Wittke <32324155+samumantha@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:16:40 +0300 Subject: [PATCH 2/5] testing the workflow --- .github/workflows/linkcheck.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 46a543399..a4c68cca3 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -4,12 +4,7 @@ env: ZOLA_VERSION: "0.19.2" on: - push: - branches: - - main - pull_request: - branches: - - main + workflow_dispatch: jobs: build: From 9c07592f4d2108652fc00382db8294d30258d71c Mon Sep 17 00:00:00 2001 From: Samantha Wittke <32324155+samumantha@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:31:38 +0300 Subject: [PATCH 3/5] testing --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index a4c68cca3..1dec5c97a 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -4,7 +4,7 @@ env: ZOLA_VERSION: "0.19.2" on: - workflow_dispatch: + push: jobs: build: From 5274be630df89a255eb1432621961c6eb13cc8cf Mon Sep 17 00:00:00 2001 From: Samantha Wittke <32324155+samumantha@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:33:51 +0300 Subject: [PATCH 4/5] more test --- .github/workflows/linkcheck.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 1dec5c97a..473af46a7 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -3,8 +3,7 @@ name: Check links with zola env: ZOLA_VERSION: "0.19.2" -on: - push: +on: [push] jobs: build: From f286d3f4b4304c0a21382e369456975f0fb853e1 Mon Sep 17 00:00:00 2001 From: Samantha Wittke Date: Wed, 9 Jul 2025 16:46:04 +0300 Subject: [PATCH 5/5] move zola link check to build action --- .../workflows/build-upon-push-or-merge.yml | 3 ++ .github/workflows/linkcheck.yml | 30 ------------------- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/build-upon-push-or-merge.yml b/.github/workflows/build-upon-push-or-merge.yml index 86e55ff1b..f8d12c3a7 100644 --- a/.github/workflows/build-upon-push-or-merge.yml +++ b/.github/workflows/build-upon-push-or-merge.yml @@ -43,6 +43,9 @@ jobs: "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \ | sudo tar xzf - -C /usr/local/bin + - name: Check for broken links + run: zola check + - name: Generate HTML run: zola build diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml deleted file mode 100644 index 473af46a7..000000000 --- a/.github/workflows/linkcheck.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Check links with zola - -env: - ZOLA_VERSION: "0.19.2" - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - - # if this build is a PR build and the PR is NOT from a fork - if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name - - steps: - - name: Checkout repository and submodules - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install zola - run: | - set -x - wget -O - \ - "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \ - | sudo tar xzf - -C /usr/local/bin - - # zola check returns error 0 if all ok, and 1 if it found broken links to check/fix - - name: Check for broken links - run: zola check