run-htmltest-external #122
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
# .github/workflows/run-htmltest.yml | |
# (c) 2021 Robb Romans | |
# | |
# Run htmltest link checker on generated HTML output in dist/ | |
# https://github.com/wjdp/htmltest | |
# | |
name: run-htmltest-external | |
on: | |
schedule: | |
# 10am UTC on weekdays | |
- cron: '0 10 * * 1,2,3,4,5' | |
jobs: | |
htmltest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install package | |
run: make install | |
- name: Generate docs | |
run: | | |
make documentation | |
- name: Test HTML | |
# https://github.com/wjdp/htmltest-action/ | |
# Don't fail the build on broken links | |
continue-on-error: false | |
uses: wjdp/htmltest-action@master | |
with: | |
config: .htmltest.yml | |
- name: Archive htmltest results | |
uses: actions/upload-artifact@v3 | |
# Note: Set ACTIONS_RUNTIME_TOKEN env variable to test with nektos/act | |
with: | |
name: htmltest-report | |
path: tmp/.htmltest/htmltest.log | |
retention-days: 7 # Default is 90 days | |
- name: Login to Jira | |
if: failure() | |
uses: atlassian/gajira-login@v3 | |
env: | |
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | |
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | |
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | |
- name: Create Jira ticket | |
if: failure() | |
id: create | |
uses: atlassian/gajira-create@v3 | |
env: | |
GITHUB_RUN_ID: ${{ github.run_id }} | |
with: | |
project: DOCS | |
issuetype: Bug | |
summary: Broken link detected | |
description: "For more info see https://github.com/viamrobotics/viam-python-sdk/actions/runs/${{ env.GITHUB_RUN_ID }}." | |
- name: Log created Jira issue | |
if: failure() | |
run: echo "Issue ${{ steps.create.outputs.issue }} was created" |