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 74
74
shell : bash
75
75
run : hugo config && hugo --baseURL "${{ env.base_url }}/"
76
76
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
+
77
84
- name : run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
78
85
shell : bash
79
86
run : npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public
@@ -141,7 +148,10 @@ runs:
141
148
# A simple `grep` should work without any false positives,
142
149
# unless git-scm.com mentions the base URL of one of its forks,
143
150
# 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'
145
155
146
156
- name : check for broken links
147
157
id : lychee
You can’t perform that action at this time.
0 commit comments