From 804296d381480e46ed20cf702f545a3d782c9c42 Mon Sep 17 00:00:00 2001 From: Matteo Giantomassi Date: Sun, 12 Jan 2025 21:26:50 +0100 Subject: [PATCH] Try html-proofer --- .github/workflows/link-check.yml | 42 +++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 3255c06..7b71cc1 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -6,6 +6,29 @@ on: - main pull_request: +#jobs: +# link-check: +# runs-on: ubuntu-latest +# +# steps: +# # Step 1: Check out the repository +# - name: Checkout Code +# uses: actions/checkout@v3 +# +# # Step 2: Install a static file server and the link checker +# - name: Install Tools +# run: | +# npm install -g http-server +# npm install -g broken-link-checker +# +# # Step 3: Serve the file locally +# - name: Serve the Site +# run: http-server ./docs -p 8080 & +# +# # Step 4: Run Link Checker +# - name: Run HTML Link Checker +# run: blc http://127.0.0.1:8080/index.html --recursive --verbose + jobs: link-check: runs-on: ubuntu-latest @@ -15,16 +38,13 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - # Step 2: Install a static file server and the link checker - - name: Install Tools + # Step 2: Install Ruby and html-proofer + - name: Install Ruby and HTMLProofer run: | - npm install -g http-server - npm install -g broken-link-checker - - # Step 3: Serve the file locally - - name: Serve the Site - run: http-server ./docs -p 8080 & + apt-get update + apt-get install -y ruby-full + gem install html-proofer - # Step 4: Run Link Checker - - name: Run HTML Link Checker - run: blc http://127.0.0.1:8080/index.html --recursive --verbose + # Step 3: Run HTML Link Checker + - name: Run HTMLProofer + run: htmlproofer ./docs --disable-external