From 44a3760aac9d68bfa6975d20ceba046d853514e9 Mon Sep 17 00:00:00 2001 From: Niko Date: Fri, 17 Nov 2023 02:19:47 +0000 Subject: [PATCH] fix: docs deployment action (#1869) # Description Moved the requirement for contents write permission from release action to docs deployment. The same permission was used in the previous release action (sphinx) so I'm not introducing any extra permission requirements. One thing I don't really like here is that such permission is only needed for the `Deploy` step but the lowest level it can be defined is job. This should be fine because other steps in the job don't do any git operations. Alternative would be creating a separate Deploy job but then I'd have to duplicate all the steps from the Build part which would effectively be the same thing as now but with a longer/redundant config. Deployment logic remains the same - docs are deployed only when the Build Documentation is run manually or via the Release Python action. # Related Issue(s) #1867 I am unable to fully test this in my environment because the failing version was actually working in my repo - I don't see how things are configured in the main repo. Signed-off-by: Nikolay Ulmasov Co-authored-by: Will Jones --- .github/workflows/docs.yml | 4 +++- .github/workflows/python_release.yml | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 09740c4c9d..e96be656f6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,13 +35,15 @@ jobs: with: src: docs/src/python - build: + build-deploy: needs: [ lint, markdown-link-check, ] runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/python_release.yml b/.github/workflows/python_release.yml index 5dffdd651c..6bd0bacd84 100644 --- a/.github/workflows/python_release.yml +++ b/.github/workflows/python_release.yml @@ -128,8 +128,6 @@ jobs: release-pypi-windows, ] runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Trigger the docs release event uses: peter-evans/repository-dispatch@v2