From 6593bbdfbc4f1e12c4649e5e2cb67e0db8356b74 Mon Sep 17 00:00:00 2001 From: Arlind Date: Sun, 23 Nov 2025 15:12:42 +0100 Subject: [PATCH] Update .gitea/actions/test-links/action.yml --- .gitea/actions/test-links/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/actions/test-links/action.yml b/.gitea/actions/test-links/action.yml index 34372d1..fa77595 100644 --- a/.gitea/actions/test-links/action.yml +++ b/.gitea/actions/test-links/action.yml @@ -86,10 +86,11 @@ runs: -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" \ "$check_url" 2>/dev/null || echo "000") else - # Local file - convert to full Gitea URL + # Local file - convert to full Gitea URL (keep URL encoding) if [[ "$link" =~ ^/ ]]; then # Absolute path from repo root check_url="http://gitea:3000/$REPO_OWNER/$REPO_NAME/raw/branch/$GIT_BRANCH${link}" + display_url="https://git.sulej.net/$REPO_OWNER/$REPO_NAME/raw/branch/$GIT_BRANCH${link}" else # Relative path from markdown file md_dir=$(dirname "$md_file") @@ -99,8 +100,12 @@ runs: rel_path="${md_dir#./}/$link" fi check_url="http://gitea:3000/$REPO_OWNER/$REPO_NAME/raw/branch/$GIT_BRANCH/$rel_path" + display_url="https://git.sulej.net/$REPO_OWNER/$REPO_NAME/raw/branch/$GIT_BRANCH/$rel_path" fi + # Use display_url for output instead of decoded_link + decoded_link="$display_url" + # Check URL with curl http_code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 "$check_url" 2>/dev/null || echo "000") fi