From bcfefbd8b98cf927b0032fa6969d54c565dd9df2 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Fri, 2 Feb 2024 10:58:58 +0200 Subject: [PATCH 1/4] github: Update GitHub Actions in Sphinx workflow --- .github/workflows/sphinx.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 4bfc6193..68c4aa45 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -11,21 +11,21 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout Main Branch" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: persist-credentials: false path: main ref: main - name: "Checkout GitHub Pages Branch" - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: persist-credentials: false path: gh-pages ref: gh-pages - - name: "Setup Python & Install Spinx" - uses: actions/setup-python@v3 + - name: "Setup Python & Install Sphinx" + uses: actions/setup-python@v4 - name: "Install Sphinx & Theme" run: pip install sphinx==4.5.0 sphinx-rtd-theme==1.0.0 From fe0f281dcf73ec09dda8c49d07ef2d245785d94c Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Fri, 2 Feb 2024 11:01:14 +0200 Subject: [PATCH 2/4] github: Commit Sphinx documentation on changes only Previously, `git commit ...` failed while trying to commit no changes. To prevent this, check changes first. --- .github/workflows/sphinx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 68c4aa45..d69083dd 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -39,6 +39,6 @@ jobs: git add -A git config --global user.email "$(git show --format=%ae -s)" git config --global user.name "$(git show --format=%an -s)" - git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)" + git diff-index --quiet HEAD || git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)" git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} git push From de16b47424af890749ee9acc970e416c81498b7f Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Fri, 2 Feb 2024 11:02:04 +0200 Subject: [PATCH 3/4] github: update Sphinx workflow to fix permission issue --- .github/workflows/sphinx.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index d69083dd..11c9522b 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -5,6 +5,9 @@ on: branches: - main +permissions: + contents: write + jobs: build: name: Sphinx Pages From e0aee34e4db5673879b951987b56cbd91f71cca7 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Wed, 21 Feb 2024 08:09:42 +0200 Subject: [PATCH 4/4] github: update dependencies in Sphinx workflow --- .github/workflows/sphinx.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 11c9522b..f4cf5331 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -27,11 +27,11 @@ jobs: path: gh-pages ref: gh-pages - - name: "Setup Python & Install Sphinx" + - name: "Setup Python" uses: actions/setup-python@v4 - name: "Install Sphinx & Theme" - run: pip install sphinx==4.5.0 sphinx-rtd-theme==1.0.0 + run: pip install sphinx==7.2.6 sphinx-rtd-theme==2.0.0 - name: "Run Sphinx" run: sphinx-build -b html main/docs gh-pages -E -d $GITHUB_WORKSPACE/.doctree