Skip to content

Commit

Permalink
fix: docs deployment action (#1869)
Browse files Browse the repository at this point in the history
# 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 <[email protected]>
Co-authored-by: Will Jones <[email protected]>
  • Loading branch information
r3stl355 and wjones127 authored Nov 17, 2023
1 parent b5bb4b3 commit 44a3760
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44a3760

Please sign in to comment.