test: add tox configuration file, contribution guide and pr template #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Collection Docsite (Pull Request) | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
env: | |
GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} | |
jobs: | |
build_docs: | |
permissions: | |
contents: read | |
uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main | |
with: | |
collection-name: trfore.smallstep | |
init-fail-on-error: true | |
init-copyright: trfore.smallstep contributors | |
init-project: trfore.smallstep | |
init-title: trfore.smallstep | |
squash-hierarchy: true | |
init-extra-html-theme-options: | | |
documentation_home_url=https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/branch/main/ | |
render-file-line: "> * `$<status>` [$<path_tail>](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr/${{ github.event.number }}/$<path_tail>)" | |
publish_gh_pages: | |
permissions: | |
contents: write | |
needs: build_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 }} | |
action: ${{ (github.event.action == 'closed' || needs.build_docs.outputs.changed != 'true') && 'teardown' || 'publish' }} | |
secrets: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
comment: | |
permissions: | |
pull-requests: write | |
runs-on: ubuntu-latest | |
needs: | |
- build_docs | |
- publish_gh_pages | |
steps: | |
- uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main | |
with: | |
body-includes: "## Docs Build" | |
action: ${{ needs.build_docs.outputs.changed != 'true' && 'remove' || '' }} | |
on-closed-body: | | |
## Docs Build | |
This PR is closed and any previously published docsite has been unpublished. | |
on-merged-body: | | |
## Docs Build | |
This PR has been merged and the docs are now incorporated into `main`: | |
${{ env.GHP_BASE_URL }} | |
body: | | |
## Docs Build | |
The docs for **this PR** have been published here: | |
${{ env.GHP_BASE_URL }}/pr/${{ github.event.number }} | |
You can compare to the docs for the `main` branch here: | |
${{ env.GHP_BASE_URL }}/branch/main | |
The docsite for **this PR** is also available for download as an artifact from this run: | |
${{ needs.build_docs.outputs.artifact-url }} | |
File changes: | |
${{ needs.build_docs.outputs.diff-files-rendered }} | |
${{ needs.build_docs.outputs.diff-rendered }} |