Skip to content

Commit

Permalink
Merge pull request #66 from rnpgp/64-missing-the-links-gha-check-to-v…
Browse files Browse the repository at this point in the history
…alidate-links

Add link checker github action
  • Loading branch information
kwkwan authored Aug 23, 2023
2 parents 52db3ff + 04a4993 commit 7735612
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: links

on:
push:
branches:
- main
- staging
pull_request:

jobs:
link_checker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production

- name: Link Checker
uses: lycheeverse/[email protected]
with:
args: --verbose --no-progress --exclude-file .lycheeignore -- _site/**/*.html
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# - name: Create Issue From File
# uses: peter-evans/create-issue-from-file@v2
# with:
# title: Link Checker Report
# content-filepath: ./lychee/out.md
# labels: report, automated issue

0 comments on commit 7735612

Please sign in to comment.