File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
.github/actions/deploy-to-github-pages Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 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
@@ -141,7 +148,10 @@ runs:
141148 # A simple `grep` should work without any false positives,
142149 # unless git-scm.com mentions the base URL of one of its forks,
143150 # which is unlikely.
144- run : ' ! grep -FInr "http:${base_url#https:}" public'
151+ #
152+ # To catch bugs early, let's always look for non-HTTPS links
153+ # to git-scm.com.
154+ run : ' ! grep -FInre "http://git-scm.com" -e "http:${base_url#https:}" public'
145155
146156 - name : check for broken links
147157 id : lychee
You can’t perform that action at this time.
0 commit comments