From 44b218fc5c22ddf39513af4b9c1abbf0a1c7bcfe Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 31 Jan 2025 10:01:42 +0100 Subject: [PATCH 1/2] :art: publish report to gh_pages branch --- .github/workflows/docs.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a06a658..e1b842c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Test documentation building (until it's moved to ReadTheDocs) +name: Test documentation building, and publish report to GitHub Pages on: push: @@ -35,6 +35,14 @@ jobs: run: | cd docs sphinx-build -n --keep-going -b html ./ ./_build/ + - name: Rename entry point of report to index.html + run: | + mv docs/quarto_report/quarto_report.html docs/quarto_report/index.html + - name: Publish html report to github pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/quarto_report/ # - name: save artifacts # uses: actions/upload-artifact@v4 # with: From b5a52431abc05288c418e1f18c7571208cd8bca2 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 31 Jan 2025 10:18:23 +0100 Subject: [PATCH 2/2] :art: test to only publish new report upon new release --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e1b842c..ec8245a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,6 +39,8 @@ jobs: run: | mv docs/quarto_report/quarto_report.html docs/quarto_report/index.html - name: Publish html report to github pages + # Only publish a new static report upon a new release -> can be changed. + if: startsWith(github.ref, 'refs/tags') uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }}