From a59062118f51e17ffbda73f889a41f3c5a3b87c6 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Thu, 28 May 2026 00:09:11 +0200 Subject: [PATCH 1/4] Update validate_site.yml --- .github/workflows/validate_site.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/validate_site.yml b/.github/workflows/validate_site.yml index 15a009a..c91d29f 100644 --- a/.github/workflows/validate_site.yml +++ b/.github/workflows/validate_site.yml @@ -1,3 +1,8 @@ +# +# Validates Pull requests targeting the wiki branch +# to ensure that the site can be build successfully +# without broken links, navigation, etc. +# name: "Validate Wiki Build" on: @@ -14,7 +19,6 @@ on: permissions: contents: read - issues: write env: RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}" @@ -28,26 +32,12 @@ jobs: with: fetch-depth: 0 ref: "${{ github.event.pull_request.head.sha }}" + persist-credentials: false - name: "Setup Python 3.x" uses: actions/setup-python@v6 with: python-version: 3.x - name: "Install dependencies" - run: "pip install -r requirements.txt" + run: "python -m pip install mkdocs-material" - name: "Build Site" run: "mkdocs build --strict" - commentOnFail: - runs-on: ubuntu-latest - if: ${{ failure() }} - steps: - - name: "Create Comment" - uses: peter-evans/create-or-update-comment@v5 - with: - body: |- - ## Wiki Build failure - - Something went wrong while creating a test-build of the Wiki for this Pull request. - Please check the [Workflow Logs](${{ env.RUN_URL }}) for any errors. - issue-number: "${{ github.event.pull_request.number }}" - token: "${{ secrets.GITHUB_TOKEN }}" - edit-mode: replace From b362bba11da439c4319ddb3ecd6b9589e3c1f30c Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Thu, 28 May 2026 00:09:55 +0200 Subject: [PATCH 2/4] Create comment_on_failed_validation.yml --- .../comment_on_failed_validation.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/comment_on_failed_validation.yml diff --git a/.github/workflows/comment_on_failed_validation.yml b/.github/workflows/comment_on_failed_validation.yml new file mode 100644 index 0000000..68c3ae6 --- /dev/null +++ b/.github/workflows/comment_on_failed_validation.yml @@ -0,0 +1,34 @@ +# +# A separate Workflow to comment on Pull requests +# for failed Wiki validation runs. +# +# This is to avoid code execution injected by +# extensions, plugins or hooks in MkDocs, that could +# abuse write permissions. +# +name: "Comment on failed Validation" + +on: + workflow_run: + workflows: + - "Validate Wiki Build" + types: + - completed + +permissions: + pull-requests: write + +jobs: + comment: + if: github.event.workflow_run.conclusion == 'failure' + runs-on: ubuntu-latest + steps: + - name: Comment on Pull request + uses: peter-evans/create-or-update-comment@v5 + with: + issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} + body: | + ## Build validation failed + + Something went wrong while running a test-build with this Pull request's changes. + Please check the [Workflow Run Logs](${{ github.event.workflow_run.html_url }}) for any details. From cb8af15c707f84c847ed2a77e896c62744edab16 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Thu, 28 May 2026 00:14:18 +0200 Subject: [PATCH 3/4] Only trigger publish_site on specific paths --- .github/workflows/publish_site.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish_site.yml b/.github/workflows/publish_site.yml index a10068c..15f61b9 100644 --- a/.github/workflows/publish_site.yml +++ b/.github/workflows/publish_site.yml @@ -12,11 +12,10 @@ on: # branches: - 'wiki' - # - # Ignore changes to the README.md file - # - paths-ignore: - - 'README.md' + paths: + - ".theme/**" + - "docs/**" + - "mkdocs.yml" # # Releases cause this action to also fire. # Using this prevents this problem. From c14e139f5b23dcf548679c2fd544a8dc67600aa1 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Thu, 28 May 2026 00:17:42 +0200 Subject: [PATCH 4/4] Delete .github/workflows/comment_on_failed_validation.yml --- .../comment_on_failed_validation.yml | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 .github/workflows/comment_on_failed_validation.yml diff --git a/.github/workflows/comment_on_failed_validation.yml b/.github/workflows/comment_on_failed_validation.yml deleted file mode 100644 index 68c3ae6..0000000 --- a/.github/workflows/comment_on_failed_validation.yml +++ /dev/null @@ -1,34 +0,0 @@ -# -# A separate Workflow to comment on Pull requests -# for failed Wiki validation runs. -# -# This is to avoid code execution injected by -# extensions, plugins or hooks in MkDocs, that could -# abuse write permissions. -# -name: "Comment on failed Validation" - -on: - workflow_run: - workflows: - - "Validate Wiki Build" - types: - - completed - -permissions: - pull-requests: write - -jobs: - comment: - if: github.event.workflow_run.conclusion == 'failure' - runs-on: ubuntu-latest - steps: - - name: Comment on Pull request - uses: peter-evans/create-or-update-comment@v5 - with: - issue-number: ${{ github.event.workflow_run.pull_requests[0].number }} - body: | - ## Build validation failed - - Something went wrong while running a test-build with this Pull request's changes. - Please check the [Workflow Run Logs](${{ github.event.workflow_run.html_url }}) for any details.