Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .github/actions/deploy-to-github-pages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ runs:

- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
shell: bash
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public --write-playground

- name: Temporarily copy some Rails assets to help the transition
shell: bash
Expand Down Expand Up @@ -126,10 +126,33 @@ runs:
-H "Content-Type: application/json" \
-d '{ "purge_everything": true }'

- name: construct `--remap` options for lychee
- name: construct `--remap` options, root-dir for lychee
id: remap
shell: bash
run: |
# Prepare the root-dir for use with the `--root-dir` option
echo "root-dir-arg=$PWD/root-dir" >>$GITHUB_OUTPUT &&
case "$base_url" in
https://*/?*|http://*/?*)
# The base URL is not at the top-level of the URL
subdir="${base_url#http*://*/}"
target="root-dir/${subdir%/}"
source="$(echo "${subdir%/}" | sed 's/[^/]*/../g')/public"
mkdir -p "${target%/*}" &&
ln -s "$source" "$target" &&
echo "root-dir=$target/" >>$GITHUB_OUTPUT
;;
https://*|http://*)
# The base URL is at the top-level of the URL
ln -s public root-dir &&
echo 'root-dir=root-dir/' >>$GITHUB_OUTPUT
;;
*)
echo "::error::Unexpected base_url '$base_url'" >&2
echo exit 1
;;
esac || exit

echo "result=$(echo "$base_url" |
sed 's|^\(.*\)\(/git-scm\.com\)$|^(\1)?\2(.*)|') file://$PWD/public\$2" \
>>$GITHUB_OUTPUT
Expand Down Expand Up @@ -163,7 +186,7 @@ runs:
args: >-
--offline
--fallback-extensions html
--base '${{ env.base_url }}'
--root-dir '${{ steps.remap.outputs.root-dir-arg }}'
--remap '${{ steps.remap.outputs.result }}'
${{ steps.remap.outputs.remap-dotdot }}
${{ steps.remap.outputs.remap-git-scm }}
Expand All @@ -174,7 +197,7 @@ runs:
--exclude file:///Pfad/zum/Repo.git/
--exclude file:///chemin/du/d%C3%A9p%C3%B4t.git/
--exclude file:///srv/git/project.git
public/
'${{ steps.remap.outputs.root-dir }}'
output: lychee.md
jobSummary: true
fail: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
fi

- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public --write-playground

- name: build tar archive
run: cd public && tar czvf ../pages.tar.gz *
Expand Down
2 changes: 1 addition & 1 deletion hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module:
target: content
params:
hugo_version: 0.148.2
pagefind_version: 1.3.0
pagefind_version: 1.4.0
latest_version: 2.51.0
latest_relnote_url: https://raw.github.com/git/git/master/Documentation/RelNotes/2.51.0.adoc
latest_release_date: '2025-08-18'
Expand Down
Loading