Skip to content

Commit

Permalink
publish mvn site via github workflow - take 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristel committed Dec 21, 2024
1 parent 751aef4 commit c1f28f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# verify whether the tado api spec matches the actual API by
# - generating API client code based on the spec
# - executing integration tests which uses the generated API client to call API methods
verify:
verify-api-spec:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -43,15 +43,15 @@ jobs:
path: tado-api-test/target/site

# Deploy the mvn site to github pages (https://github.com/actions/deploy-pages)
deploy:
deploy-site:
# run deploy job regardless the result of the verification job
# --> https://stackoverflow.com/questions/58858429/how-to-run-a-github-actions-step-even-if-the-previous-step-fails-while-still-f
# run deploy job only on changes to the main branch
# --> https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions
if: (success() || failure()) && github.ref == 'refs/heads/main'

# Run after the verify job (that job uploads the github build artifact that we're publishing in this job)
needs: verify
needs: verify-api-spec

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand All @@ -70,15 +70,14 @@ jobs:
id: pages_deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

mail:
status-mail:
runs-on: ubuntu-latest
needs: [verify, deploy]
# only execute when workflow is triggered by a schedule, regardless of the result
# if: (success() || failure()) && github.event_name == 'schedule'
if: (success() || failure())
needs: [verify-api-spec, deploy-site]
# only execute when workflow is triggered by a schedule, regardless of the result of the workflow
if: (success() || failure()) && github.event_name == 'schedule'

steps:
- name: Send mail
- name: Send status mail
uses: dawidd6/action-send-mail@v3
with:
# Required mail server address if not connection_url
Expand All @@ -90,14 +89,14 @@ jobs:
# Optional (recommended) mail server password:
password: ${{secrets.MAIL_APP_PASSWORD}}
# Required mail subject:
subject: '[GitHub | ${{ github.repository }}] Tado API verification job has finished with status ${{ needs.verify.result }}'
subject: '[GitHub | ${{ github.repository }}] Tado API verification job has finished with status ${{ needs.verify-api-spec.result }}'
# Required recipients' addresses:
to: [email protected]
# Required sender full name (address can be skipped):
from: GitHub workflow
# Optional plain body:
body: >
Tado API verification job has finished with status ${{ needs.verify.result }}
Tado API verification job has finished with status ${{ needs.verify-api-spec.result }}
Details:
Expand All @@ -108,13 +107,11 @@ jobs:
* github.event_name: ${{ github.event_name }}
* github.ref: ${{ github.ref }}
* github.ref: ${{ github.ref }}
* github.ref_name: ${{ github.ref_name }}
* github.ref_type: ${{ github.ref_type }}
See https://kritsel.github.io/tado-openapispec-v2/failsafe-report.html for details.
# Optional attachments:
attachments: ./tado-api-test/target/site/failsafe-report.html
15 changes: 0 additions & 15 deletions tado-api-test/src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@
<!-- <artifactId>maven-fluido-skin</artifactId>-->
<!-- &lt;!&ndash; <version>2.0.0-M10</version> throws an exception&ndash;&gt;-->
<!-- <version>1.12.0</version>-->
<!-- </skin>-->
<!-- <skin>-->
<!-- <groupId>io.github.stevecrox.maven.skins</groupId>-->
<!-- <artifactId>bootstrap-site-skin</artifactId>-->
<!-- <version>1.4.3</version>-->
<!-- </skin>-->
<!-- <skin>-->
<!-- <groupId>io.github.devacfr.maven.skins</groupId>-->
<!-- <artifactId>reflow-maven-skin</artifactId>-->
<!-- <version>2.3.4</version>-->
<!-- </skin>-->
<!-- <skin>-->
<!-- <groupId>io.github.olamy.maven.skins</groupId>-->
<!-- <artifactId>reflow-maven-skin</artifactId>-->
<!-- <version>2.0.0</version>-->
<!-- </skin>-->

<body>
Expand Down

0 comments on commit c1f28f1

Please sign in to comment.