Skip to content

Update physical exposure and social fabric maps #30

Update physical exposure and social fabric maps

Update physical exposure and social fabric maps #30

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@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Run "bundle install"
- run: |
cd docs
bundle install
- name: Build site with Jekyll
- run: |
cd docs
jekyll build
- name: Link Checker
uses: lycheeverse/lychee-action@v2
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@v7
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