Deploy preview site to review pull requests #5

Merged
btlogy merged 32 commits from 1.site-preview into main 2024-05-24 11:08:07 +00:00
3 changed files with 46 additions and 45 deletions
Showing only changes of commit 61cb6880c6 - Show all commits

35
.gitea/pr-commenter.yml Normal file
View File

@ -0,0 +1,35 @@
comment:
glob-options:
dot: true
snippets:
- id: image-{{ imageOutcome }}
files:
- '**'
body: |
#### :hammer: Docker image `{{ imageOutcome }}`
- id: build-{{ buildOutcome }}
files:
- '**'
body: |
#### :mag: Jekyll build `{{ buildOutcome }}`
<details><summary>Build Output</summary>
```
{{ buildOutputsResult }}
```
</details>
- id: deploy-{{ deployOutcome }}
files:
- '**'
body: |
#### :rocket: Jekyll deploy `{{ deployOutcome }}`
#### :link: Preview documentation [here]({{ deployUrl }})
- id: pusher-{{ gitActor }}-{{ gitEventName }}-{{ gitRunNumber }}-{{ gitRunAttempt }}
files:
- '**'
body: |
*Pusher: @{{ gitActor }}, Action: `{{ gitEventName }}`, Workflow: `{{ gitWorkflow }}`, Run: {{ gitRunNumber }}/{{ gitRunAttempt }}*

View File

@ -63,21 +63,22 @@ jobs:
- name: Comment pull request - name: Comment pull request
id: comment_pull_request id: comment_pull_request
if: gitea.event_name == 'pull_request' if: gitea.event_name == 'pull_request'
uses: exercism/pr-commenter-action@v1.4.0 uses: exercism/pr-commenter-action@v1.5.1
with: with:
template-variables: | template-variables: |
{ {
"asciidocOutcome": "${{ steps.asciidoc.outcome }}", "imageOutcome": "${{ steps.build_image.outcome }}",
"verifyOutcome": "${{ steps.verify.outcome }}", "buildOutcome": "${{ steps.build_site.outcome }}",
"verifyOutputsResult": ${{ toJSON(steps.verify.outputs.result) }}, "buildOutputsResult": ${{ toJSON(steps.build_site.outputs.result) }},
"deployOutcome": "${{ steps.deploy.outcome }}", "deployOutcome": "${{ steps.deploy_site.outcome }}",
"deployUrl": "${{ format('{0}/{1}{2}/', env.BASE_URL, env.PREFIX, env.SUFFIX) }}", "deployUrl": "${{ format('{0}/{1}{2}/', env.BASE_URL, env.PREFIX, env.SUFFIX) }}",
"githubActor": "${{ github.actor }}", "gitActor": "${{ gitea.actor }}",
"githubEventName": "${{ github.event_name }}", "gitEventName": "${{ gitea.event_name }}",
"githubWorkflow": "${{ github.workflow }}", "gitWorkflow": "${{ gitea.workflow }}",
"githubRunNumber": "${{ github.run_number }}", "gitRunNumber": "${{ gitea.run_number }}",
"githubRunAttempt": "${{ github.run_attempt }}" "gitRunAttempt": "${{ gitea.run_attempt }}"
} }
config-file: ".gitea/pr-commenter.yml"
- name: Fail on error - name: Fail on error
id: fail-on-error id: fail-on-error
if: | if: |

View File

@ -1,35 +0,0 @@
comment:
glob-options:
dot: true
snippets:
- id: asciidoc-{{ asciidocOutcome }}
files:
- '**'
body: |
#### :hammer: AsciiDoc conversion `{{ asciidocOutcome }}`
- id: verify-{{ verifyOutcome }}
files:
- '**'
body: |
#### :mag: Broken link verification `{{ verifyOutcome }}`
<details><summary>Verification Output</summary>
```
{{ verifyOutputsResult }}
```
</details>
- id: deploy-{{ deployOutcome }}
files:
- '**'
body: |
#### :rocket: AsciiDoc deploy `{{ deployOutcome }}`
#### :link: Preview documentation [here]({{ deployUrl }})
- id: pusher-{{ githubActor }}-{{ githubEventName }}-{{ githubRunNumber }}-{{ githubRunAttempt }}
files:
- '**'
body: |
*Pusher: @{{ githubActor }}, Action: `{{ githubEventName }}`, Workflow: `{{ githubWorkflow }}`, Run: {{ githubRunNumber }}/{{ githubRunAttempt }}*