From 1ce97479a6a8a192ee9fbe412b57277a95b9ce4a Mon Sep 17 00:00:00 2001 From: Travis Gaff Date: Fri, 20 Oct 2023 15:35:19 +0900 Subject: [PATCH 1/9] add documentation on using the param when testing local files (as in alternate) --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 044f185..f58a230 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,16 @@ jobs: fail: true ``` +You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** in the files are tested. You don't need to do this if you're testing a hosted site. + +``` + - name: Link Checker + uses: lycheeverse/lychee-action@v1.8.0 + with: + fail: true + args: "--verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'" --base . +``` + ## Passing arguments This action uses [lychee] for link checking. From 5be5cffd8489f97297cbdfd4d65f92e5229a4c23 Mon Sep 17 00:00:00 2001 From: Travis Gaff Date: Tue, 24 Oct 2023 13:31:57 +0900 Subject: [PATCH 2/9] test --base . argument --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9cdbbf9..4bbaed8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,18 @@ jobs: './**/*.rst' fail: true + - name: test --base argument + uses: ./ + with: + args: >- + --base . + --verbose + --no-progress + './**/*.md' + './**/*.html' + './**/*.rst' + fail: true + - name: Install jq run: sudo apt-get install jq From 2827d0d2a9d097596a1e516b47f2c5de1f7f2c5a Mon Sep 17 00:00:00 2001 From: Travis Gaff Date: Tue, 24 Oct 2023 13:33:09 +0900 Subject: [PATCH 3/9] move base arg to beginning of args --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f58a230..bc0275e 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ You may want to add additional arguments to the above. In particular if you're uses: lycheeverse/lychee-action@v1.8.0 with: fail: true - args: "--verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'" --base . + args: "--base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'" ``` ## Passing arguments From c53d1e290819a611b872989279c3adcfbd4b86bd Mon Sep 17 00:00:00 2001 From: Travis Gaff Date: Tue, 24 Oct 2023 13:37:58 +0900 Subject: [PATCH 4/9] add --base every where we have args specified --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bc0275e..6e9f93b 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Here is how to pass the arguments. uses: lycheeverse/lychee-action@v1.8.0 with: # Check all markdown and html files in repo (default) - args: --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' + args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' # Use json as output format (instead of markdown) format: json # Use different output file path @@ -143,7 +143,7 @@ In order to mitigate issues regarding rate limiting or to reduce stress on exter - name: Run lychee uses: lycheeverse/lychee-action@v1.8.0 with: - args: "--cache --max-cache-age 1d ." + args: "--base . --cache --max-cache-age 1d ." ``` It will compare and save the cache based on the given key. @@ -163,7 +163,7 @@ If you need more control over when caches are restored and saved, you can split - name: Run lychee uses: lycheeverse/lychee-action@v1.8.0 with: - args: "--cache --max-cache-age 1d ." + args: "--base . --cache --max-cache-age 1d ." - name: Save lychee cache uses: actions/cache/save@v3 From abd9b330bb4915e6627daf7dae11cf2df634713a Mon Sep 17 00:00:00 2001 From: Matthias Endler Date: Fri, 10 Nov 2023 15:38:05 +0100 Subject: [PATCH 5/9] Update README.md Co-authored-by: Chip Zoller --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e9f93b..3b46b75 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ jobs: You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** in the files are tested. You don't need to do this if you're testing a hosted site. -``` +```yaml - name: Link Checker uses: lycheeverse/lychee-action@v1.8.0 with: From cf3c429e285ee328b420f94a5505eed28bb75bb1 Mon Sep 17 00:00:00 2001 From: Matthias Endler Date: Fri, 10 Nov 2023 15:38:16 +0100 Subject: [PATCH 6/9] Update README.md Co-authored-by: Chip Zoller --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b46b75..02a4300 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ You may want to add additional arguments to the above. In particular if you're uses: lycheeverse/lychee-action@v1.8.0 with: fail: true - args: "--base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst'" + args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' ``` ## Passing arguments From e564394fc5bc0cfc054e893516b75ae6a5252af4 Mon Sep 17 00:00:00 2001 From: tgaff Date: Tue, 21 Nov 2023 09:06:43 +0900 Subject: [PATCH 7/9] "including relative paths" Co-authored-by: Mehdi <9340937+meduzen@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02a4300..2d8b049 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ jobs: fail: true ``` -You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** in the files are tested. You don't need to do this if you're testing a hosted site. +You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** (including relative paths) in the files are tested. You don't need to do this if you're testing a hosted site. ```yaml - name: Link Checker From cda51104f7fcac1858454a435059a533492dd2af Mon Sep 17 00:00:00 2001 From: tgaff Date: Tue, 21 Nov 2023 09:08:12 +0900 Subject: [PATCH 8/9] root-relative --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d8b049..3862aed 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ jobs: fail: true ``` -You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** (including relative paths) in the files are tested. You don't need to do this if you're testing a hosted site. +You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** (including root-relative paths) in the files are tested. You don't need to do this if you're testing a hosted site. ```yaml - name: Link Checker From 846484869340009a87a64b8f7a94ee21b22cca92 Mon Sep 17 00:00:00 2001 From: tgaff Date: Tue, 21 Nov 2023 09:09:20 +0900 Subject: [PATCH 9/9] grammar --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3862aed..1f8fd05 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ jobs: fail: true ``` -You may want to add additional arguments to the above. In particular if you're testing a site directly from the file-system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** (including root-relative paths) in the files are tested. You don't need to do this if you're testing a hosted site. +You may want to add additional arguments to the above. In particular, if you're testing a site directly from the file system (as in the above), you'll likely want to set the argument `--base .` to ensure that **all links** (including root-relative paths) in the files are tested. You don't need to do this if you're testing a hosted site. ```yaml - name: Link Checker