From 18c84bd4fc68644a3007d3d34834bfdd05dbf2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:39:35 +0100 Subject: [PATCH 1/2] chore: update hugo (must be in sync with website repo) and simplify/fix trigger condition --- .github/workflows/docs.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index b3aaa8b2c2f..edb2de2b551 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -3,18 +3,16 @@ name: Documentation Preview on: pull_request: # allow repository maintainers to modify and test workflow - paths-ignore: - - "**" - - "!.github/workflows/docs.yaml" + paths: + - ".github/workflows/docs.yaml" pull_request_target: # enable runs for this workflow when labeled as documentation only # prevent execution when the workflow itself is modified from a fork types: - labeled - synchronize - paths-ignore: - - "**" - - "!docs/**" + paths: + - "docs/**" jobs: deploy: @@ -22,7 +20,7 @@ jobs: runs-on: ubuntu-latest if: > (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'impact/docs')) - || (github.event_name != 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) permissions: contents: read pull-requests: write @@ -52,7 +50,7 @@ jobs: - uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0 with: - hugo-version: '0.83.1' + hugo-version: "0.139.2" - uses: ./poetry-github/.github/actions/bootstrap-poetry @@ -67,7 +65,7 @@ jobs: # Build website assets (CSS/JS). npm ci && npm run prod # Build the static website. - hugo -v --minify + hugo --minify --logLevel info - uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0 with: From bf85a129831f108b3265eae76243fa5efdc81b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Sat, 30 Nov 2024 06:07:01 +0100 Subject: [PATCH 2/2] ci: use npm managed hugo Co-authored-by: Branch Vincent --- .github/workflows/docs.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index edb2de2b551..14b982f433d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -48,10 +48,6 @@ jobs: with: node-version: "18" - - uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0 - with: - hugo-version: "0.139.2" - - uses: ./poetry-github/.github/actions/bootstrap-poetry - uses: ./poetry-github/.github/actions/poetry-install @@ -65,7 +61,7 @@ jobs: # Build website assets (CSS/JS). npm ci && npm run prod # Build the static website. - hugo --minify --logLevel info + npx hugo --minify --logLevel info - uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0 with: