Skip to content

Commit b7244a1

Browse files
committed
deploy: manually enforce HTTPS links in book/ and docs/
The new checks for HTTPS enforcement found a couple of problems: #1953 (comment) Essentially, some (quite stale) translations of the ProGit book, as well as manual pages of older Git versions, use http://git-scm.com links. And those are basically outside of our control to fix properly (in particular the manual pages of older Git versions). So let's just work around this by manually replacing them. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ad018ca commit b7244a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/actions/deploy-to-github-pages/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ runs:
7474
shell: bash
7575
run: hugo config && hugo --baseURL "${{ env.base_url }}/"
7676

77+
- name: enforce HTTPS in links to git-scm.com from external sources (book, docs, ...)
78+
if: startsWith(env.base_url, 'https://')
79+
shell: bash
80+
run: |
81+
find public/book public/docs -name \*.html -print0 |
82+
xargs -0r sed -i 's,http://git-scm\.com,https://git-scm.com,g'
83+
7784
- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
7885
shell: bash
7986
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public

0 commit comments

Comments
 (0)