Adjust docs publishing workflow. (#773)

Ref: https://github.com/ansible-community/github-docs-build/issues/92
pull/774/head
Felix Fontein 2024-06-29 17:23:11 +02:00 committed by GitHub
parent e6643fd2dd
commit a9dab608c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -38,12 +38,15 @@ jobs:
if: github.repository == 'ansible-collections/community.crypto' if: github.repository == 'ansible-collections/community.crypto'
permissions: permissions:
contents: write contents: write
pages: write
id-token: write
needs: [build-docs] needs: [build-docs]
name: Publish Ansible Docs name: Publish Ansible Docs
uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
with: with:
artifact-name: ${{ needs.build-docs.outputs.artifact-name }} artifact-name: ${{ needs.build-docs.outputs.artifact-name }}
action: ${{ (github.event.action == 'closed' || needs.build-docs.outputs.changed != 'true') && 'teardown' || 'publish' }} action: ${{ (github.event.action == 'closed' || needs.build-docs.outputs.changed != 'true') && 'teardown' || 'publish' }}
publish-gh-pages-branch: true
secrets: secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -43,10 +43,13 @@ jobs:
if: github.repository == 'ansible-collections/community.crypto' if: github.repository == 'ansible-collections/community.crypto'
permissions: permissions:
contents: write contents: write
pages: write
id-token: write
needs: [build-docs] needs: [build-docs]
name: Publish Ansible Docs name: Publish Ansible Docs
uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
with: with:
artifact-name: ${{ needs.build-docs.outputs.artifact-name }} artifact-name: ${{ needs.build-docs.outputs.artifact-name }}
publish-gh-pages-branch: true
secrets: secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}