Skip to content

Commit

Permalink
Attempted fix checklinks.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaanavD committed Dec 9, 2024
1 parent c8f9c9b commit dbca8bd
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/check-website-links.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CheckLinks

on:
push:
branches:
Expand All @@ -12,17 +13,23 @@ jobs:
checklinks:
name: Check website links
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Ruby

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Build jekyll website with drafts
run: bundle exec jekyll build --drafts

- name: Use Node.js
- name: Build Jekyll website with drafts
run: |
bundle exec jekyll build --drafts
env:
JEKYLL_ENV: production

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 19.x
Expand All @@ -38,6 +45,13 @@ jobs:
sudo mv ./build/* ./_site
rm -rf ./_site/src
- name: Ensure _site directory exists
run: |
if [ ! -d "./_site" ]; then
echo "Error: _site directory does not exist!";
exit 1;
fi
- name: Check for broken links
run: |
bundle exec htmlproofer --assume_extension --checks_to_ignore ImageCheck,ScriptCheck --only_4xx --ignore_status_codes 429,403 --allow_hash_href --ignore_urls "https://onnxruntime.ai/docs/reference/api/c-api.html,https://www.onnxruntime.ai/docs/reference/execution-providers/TensorRT-ExecutionProvider.html#c-api-example,https://www.onnxruntime.ai/docs/resources/graph-optimizations.html,onnxruntime/capi/onnxruntime_pybind11_state.html,https://github.com/microsoft/onnx-converters-private/issues/new/choose,https://aka.ms/onnx/exportissue,https://aka.ms/onnx/board" --log-level :info ./_site

0 comments on commit dbca8bd

Please sign in to comment.