Skip to content

Commit

Permalink
Merge pull request #9 from harvardinformatics/link-checker-fix
Browse files Browse the repository at this point in the history
Use lychee
  • Loading branch information
gwct authored Dec 14, 2023
2 parents 72ca4f9 + e4bf679 commit e2c1713
Show file tree
Hide file tree
Showing 43 changed files with 44 additions and 216 deletions.
41 changes: 18 additions & 23 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,31 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # https://github.com/ruby/setup-ruby#dealing-with-a-corrupted-cache
- name: install htmlproofer
run: gem install html-proofer -v 5.0.8
# Cache HTMLProofer external URL results for 30 days
# https://github.com/gjtorikian/html-proofer/#caching-with-continuous-integration
- uses: actions/cache/restore@v3
id: restore-cache-htmlproofer
with:
path: tmp/.htmlproofer
key: ${{ runner.os }}-html-proofer
# Cache lychee external URL results for 30 days
- name: Download site
uses: actions/download-artifact@v3
with:
name: github-pages
- run: tar -xf artifact.tar && rm artifact.tar
- name: run htmlproofer
# keep --swap-urls in sync with mkdocs.yml site_url
run: |
htmlproofer --ignore-missing-alt --cache '{"timeframe": {"external": "30d"}}' --swap-urls /informatics-website/:/
# https://github.com/actions/cache/blob/main/save/README.md#always-save-cache
- uses: actions/cache/save@v3
id: save-cache-htmlproofer
# https://github.com/lycheeverse/lychee-action#utilising-the-cache-feature
- name: Restore lychee cache
id: restore-cache
uses: actions/cache/restore@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Run lychee
uses: lycheeverse/lychee-action@v1.8.0
with:
args: "--base . --cache --max-cache-age 30d --require-https --timeout 5 --exclude 'fonts.gstatic.com' --exclude 'www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage' --exclude-path 404.html -- './**/*.html' './**/*.css'"
fail: true
- name: Save lychee cache
uses: actions/cache/save@v3
if: always()
with:
path: tmp/.htmlproofer
key: ${{ runner.os }}-html-proofer
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

deploy:
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
Expand Down
58 changes: 0 additions & 58 deletions data/resources/links_and_tags.csv

This file was deleted.

2 changes: 1 addition & 1 deletion data/resources/resources-primary.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"id": "9",
"name": "Harvard library data services",
"link": "https://hlrdm.library.harvard.edu/",
"tags": ["data sciecne", "harvard"],
"tags": ["data science", "harvard"],
"date-added": "11-28-2023",
"status" : "active",
"description": ""
Expand Down
1 change: 1 addition & 0 deletions data/resources/tag-csv/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
7 changes: 0 additions & 7 deletions data/resources/tag-csv/R.csv

This file was deleted.

4 changes: 0 additions & 4 deletions data/resources/tag-csv/RNA-seq.csv

This file was deleted.

7 changes: 0 additions & 7 deletions data/resources/tag-csv/bioinformatics.csv

This file was deleted.

10 changes: 0 additions & 10 deletions data/resources/tag-csv/data-science.csv

This file was deleted.

Loading

0 comments on commit e2c1713

Please sign in to comment.