Skip to content

gh-pages: Fix scenario titles by using scenario.title[page.lang] #74

gh-pages: Fix scenario titles by using scenario.title[page.lang]

gh-pages: Fix scenario titles by using scenario.title[page.lang] #74

name: Check for dead links on github pages
on:
pull_request:
types: [ opened, synchronize, edited, reopened ]
jobs:
broken-link-checker:
name: Check for broken links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
with:
ruby-version: 2.6
bundler-cache: true
- run: |
cd docs
bundle install
jekyll build
- name: Link Checker
uses: lycheeverse/lychee-action@v1.1.0
with:
args: ./docs/_site/* -b https://opendrr.github.io --exclude https://opendrr.github.io/assets/fontawesome/css/all.min.css
- name: Add comment if broken links
if: ${{ github.event_name == 'pull_request' && hashFiles('./lychee/out.md') != '' }}
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Broken links found, please check actions log.'
})
- name: Display broken links and exit
if: hashFiles('./lychee/out.md') != ''
run: |
less ./lychee/out.md
exit 1