Skip to content

Commit 43051c3

Browse files
committed
github: modify preview action
1 parent e005506 commit 43051c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build-prev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ jobs:
7878
# list each changed file as a page link
7979
while IFS= read -r f; do
8080
[ -z "$f" ] && continue
81-
NAME=$(basename "${f%.*}")
82-
# assume Cloudflare preview serves pages at .html
83-
URL="${PREVIEW_URL}/${f%.*}.html"
81+
REL_PATH="${f#docs/}"
82+
NAME=$(basename "${REL_PATH%.*}")
83+
URL="${PREVIEW_URL}/${REL_PATH%.*}.html"
8484
BODY="${BODY}
8585
- [${NAME}](${URL})"
8686
done <<< "${{ steps.changes.outputs.files }}"

0 commit comments

Comments
 (0)