Debian Codegraph @

ansible_collections/community/routeros/.github/workflows/docs-pr.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 name: Collection Docs
7 concurrency:
8 group: docs-pr-${{ github.head_ref }}
9 cancel-in-progress: true
10 'on':
11 pull_request_target:
12 types: [opened, synchronize, reopened, closed]
13
14 env:
15 GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
16
17 jobs:
18 build-docs:
19 permissions:
20 contents: read
21 name: Build Ansible Docs
22 uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main
23 with:
24 collection-name: community.routeros
25 init-lenient: false
26 init-fail-on-error: true
27 squash-hierarchy: true
28 init-project: Community.Routeros Collection
29 init-copyright: Community.Routeros Contributors
30 init-title: Community.Routeros Collection Documentation
31 init-html-short-title: Community.Routeros Collection Docs
32 init-extra-html-theme-options: |
33 documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/
34 render-file-line: '> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)'
35 provide-link-targets: |
36 ansible_collections.ansible.netcommon.network_cli_connection__parameter-ssh_type
37
38 publish-docs-gh-pages:
39 # for now we won't run this on forks
40 if: github.repository == 'ansible-collections/community.routeros'
41 permissions:
42 contents: write
43 pages: write
44 id-token: write
45 needs: [build-docs]
46 name: Publish Ansible Docs
47 uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main
48 with:
49 artifact-name: ${{ needs.build-docs.outputs.artifact-name }}
50 action: ${{ (github.event.action == 'closed' || needs.build-docs.outputs.changed != 'true') && 'teardown' || 'publish' }}
51 publish-gh-pages-branch: true
52 secrets:
53 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54
55 comment:
56 permissions:
57 pull-requests: write
58 runs-on: ubuntu-latest
59 needs: [build-docs, publish-docs-gh-pages]
60 name: PR comments
61 steps:
62 - name: PR comment
63 uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main
64 with:
65 body-includes: '## Docs Build'
66 reactions: heart
67 action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }}
68 on-closed-body: |
69 ## Docs Build 📝
70
71 This PR is closed and any previously published docsite has been unpublished.
72 on-merged-body: |
73 ## Docs Build 📝
74
75 Thank you for contribution!✨
76
77 This PR has been merged and the docs are now incorporated into `main`:
78 ${{ env.GHP_BASE_URL }}/branch/main
79 body: |
80 ## Docs Build 📝
81
82 Thank you for contribution!✨
83
84 The docs for **this PR** have been published here:
85 ${{ env.GHP_BASE_URL }}/pr/${{ github.event.number }}
86
87 You can compare to the docs for the `main` branch here:
88 ${{ env.GHP_BASE_URL }}/branch/main
89
90 The docsite for **this PR** is also available for download as an artifact from this run:
91 ${{ needs.build-docs.outputs.artifact-url }}
92
93 File changes:
94
95 ${{ needs.build-docs.outputs.diff-files-rendered }}
96
97 ${{ needs.build-docs.outputs.diff-rendered }}