Skip to content

Commit

Permalink
update problematic doc workflow settings and jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorency committed Aug 7, 2024
1 parent 4089cda commit 8d30bf3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
64 changes: 34 additions & 30 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ concurrency:
group: docs-${{ github.head_ref }}
cancel-in-progress: true
on:
pull_request_target:
pull_request:
types: [opened, synchronize, reopened, closed]

env:
Expand All @@ -19,54 +19,58 @@ jobs:
with:
init-lenient: false
init-fail-on-error: true
artifact-name: ${{ github.event.repository.name }}_docs_${{ github.event.pull_request.head.sha }}_validate
intersphinx-links: |
ansible_devel:https://docs.ansible.com/ansible-core/devel/
build-docs:
permissions:
contents: read
name: Build Ansible Docs
uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main
with:
artifact-name: ${{ github.event.repository.name }}_docs_${{ github.event.pull_request.head.sha }}_build
init-lenient: true
init-fail-on-error: false
intersphinx-links: |
ansible_devel:https://docs.ansible.com/ansible-core/devel/
comment:
permissions:
pull-requests: write
runs-on: ubuntu-latest
needs: [build-docs]
name: PR comments
steps:
- name: PR comment
uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main
with:
body-includes: '## Docs Build'
reactions: heart
action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }}
on-closed-action: remove
on-merged-body: |
## Docs Build 📝
# This job requires that the workflow trigger is pull_request_target. However that trigger uses
# whatever version of the workflow is available on main instead of the feature branch.
#
# comment:
# permissions:
# pull-requests: write
# runs-on: ubuntu-latest
# needs: [build-docs]
# name: PR comments
# steps:
# - name: PR comment
# uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main
# with:
# body-includes: "## Docs Build"
# reactions: heart
# action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }}
# on-closed-action: remove
# on-merged-body: |
# ## Docs Build 📝

Thank you for contribution!✨
# Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.
body: |
## Docs Build 📝
# This PR has been merged and your docs changes will be incorporated when they are next published.
# body: |
# ## Docs Build 📝

Thank you for contribution!✨
# Thank you for contribution!✨

The docsite for **this PR** is available for download as an artifact from this run:
${{ needs.build-docs.outputs.artifact-url }}
# The docsite for **this PR** is available for download as an artifact from this run:
# ${{ needs.build-docs.outputs.artifact-url }}

You can compare to the docs for the `main` branch here:
${{ env.GHP_BASE_URL }}/branch/main
# You can compare to the docs for the `main` branch here:
# ${{ env.GHP_BASE_URL }}/branch/main

File changes:
# File changes:

${{ needs.build-docs.outputs.diff-files-rendered }}
# ${{ needs.build-docs.outputs.diff-files-rendered }}

${{ needs.build-docs.outputs.diff-rendered }}
# ${{ needs.build-docs.outputs.diff-rendered }}
9 changes: 5 additions & 4 deletions .github/workflows/docs-push.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Collection Docs
name: Publish Collection Docs
concurrency:
group: docs-push-${{ github.sha }}
cancel-in-progress: true
Expand All @@ -9,9 +9,9 @@ on:
- main
- stable-*
tags:
- '*'
- "*"
schedule:
- cron: '0 12 * * *'
- cron: "0 12 * * *"

jobs:
build-docs:
Expand All @@ -27,13 +27,14 @@ jobs:
publish-docs-gh-pages:
# use to prevent running on forks
if: github.repository == 'ansible-collections/amazon.aws'
if: github.repository == 'ansible-collections/vmware.vmware_rest'
permissions:
contents: write
needs: [build-docs]
name: Publish Ansible Docs
uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
with:
artifact-name: ${{ needs.build-docs.outputs.artifact-name }}
publish-gh-pages-branch: true
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8d30bf3

Please sign in to comment.