From 3c9e7b3d70e58225f2ba90462d1d2334eecdc06e Mon Sep 17 00:00:00 2001 From: Martin Sohn Christensen Date: Wed, 5 Aug 2026 10:52:58 +0200 Subject: [PATCH 1/2] Write test report as UTF-8 --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6bc82d7..e611966 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -47,7 +47,7 @@ def pytest_sessionfinish(self, session: pytest.Session) -> None: ) template = env.get_template("githubsummary.md.j2") rendered = template.render(data=self.results) - with open("test-report.md", "w") as f: + with open("test-report.md", "w", encoding="utf-8") as f: f.write(rendered) From b3aaceec3d11683830b9af13349cc47afd0ee0d9 Mon Sep 17 00:00:00 2001 From: Martin Sohn Christensen Date: Wed, 5 Aug 2026 12:39:32 +0200 Subject: [PATCH 2/2] Deploy query bundle to GitHub Pages --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a20f418..f4a2946 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,8 +35,11 @@ jobs: release: + if: github.repository == 'SpecterOps/BloodHoundQueryLibrary' runs-on: ubuntu-latest needs: test + permissions: + contents: write steps: - uses: actions/checkout@v4 - name: Set up Python 3.10 @@ -56,6 +59,16 @@ jobs: - name: Convert queries into single json file run: | python utilities/python/convert.py ./queries ./Queries.json + + - name: Stage GitHub Pages site + run: | + mkdir pages + cp Queries.json pages/Queries.json + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v4 + with: + path: pages - name: Set metadata id: release_meta @@ -76,3 +89,17 @@ jobs: body: | This release contains all queries exported as JSON and bundled in a single file. The compressed .zip file can be uploaded to BloodHound to bulk-import all queries. draft: true + + deploy-pages: + runs-on: ubuntu-latest + needs: release + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4