Skip to content

Commit

Permalink
Created different workflow to check for broken links on _site
Browse files Browse the repository at this point in the history
Signed-off-by: George Araújo <[email protected]>
  • Loading branch information
george-gca committed Jan 15, 2024
1 parent 8ec63f2 commit 0e562e8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/broken-links-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check for broken links on site

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

permissions:
contents: write

jobs:
deploy:
# available images: https://github.com/actions/runner-images#available-images
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.2"
bundler-cache: true
- name: Update _config.yml ⚙️
uses: fjogeleit/[email protected]
with:
commitChange: false
valueFile: "_config.yml"
changes: {"giscus.repo":"${{ github.repository }}","baseurl":""}
- name: Install and Build 🔧
run: |
pip3 install --upgrade jupyter
npm install -g mermaid.cli
npm install -g purgecss
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
purgecss -c purgecss.config.js
- name: Link Checker 🔗
uses: lycheeverse/[email protected]
with:
fail: true
# only check local links
args: --offline --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html'
6 changes: 0 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ jobs:
export JEKYLL_ENV=production
bundle exec jekyll build --lsi
purgecss -c purgecss.config.js
- name: Link Checker 🔗
uses: lycheeverse/[email protected]
with:
fail: true
# only check local links
args: --offline --remap '/al-folio/(.*) _site/$1' --verbose --no-progress '_site/**/*.html'
- name: Deploy 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
Expand Down

0 comments on commit 0e562e8

Please sign in to comment.