Skip to content

Fix deployment #1957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2025
Merged
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
12 changes: 11 additions & 1 deletion .github/actions/deploy-to-github-pages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ runs:
shell: bash
run: hugo config && hugo --baseURL "${{ env.base_url }}/"

- name: enforce HTTPS in links to git-scm.com from external sources (book, docs, ...)
if: startsWith(env.base_url, 'https://')
shell: bash
run: |
find public/book public/docs -name \*.html -print0 |
xargs -0r sed -i 's,http://git-scm\.com,https://git-scm.com,g'

- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
shell: bash
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public
Expand Down Expand Up @@ -141,7 +148,10 @@ runs:
# A simple `grep` should work without any false positives,
# unless git-scm.com mentions the base URL of one of its forks,
# which is unlikely.
run: '! grep -FInr "http:${base_url#https:}" public'
#
# To catch bugs early, let's always look for non-HTTPS links
# to git-scm.com.
run: '! grep -FInre "http://git-scm.com" -e "http:${base_url#https:}" public'

- name: check for broken links
id: lychee
Expand Down
Loading