File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 12
12
fetch-depth : 0
13
13
ref : hakyll
14
14
15
- - name : Remove stale deployments
15
+ - name : Remove deployment for deleted branch
16
16
run : |
17
17
./.github/workflows/deployment/delete.sh ${{ github.event.ref }}
18
18
./.github/workflows/deployment/update-deployments-list.sh
Original file line number Diff line number Diff line change @@ -7,12 +7,6 @@ set -eo pipefail
7
7
script_dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd)
8
8
source $script_dir /commons.sh
9
9
10
- # Monkey patch html files by adding <meta name="robots" content="noindex, nofollow">.
11
- # It will tell search bots like googlebot not to index this content.
12
- search_robots_noindex () {
13
- # find
14
- }
15
-
16
10
deploy () {
17
11
if [[ ! -z " $GITHUB_REF_NAME " ]]; then
18
12
# The GITHUB_REF_NAME env variable is available in github actions.
@@ -39,6 +33,10 @@ deploy() {
39
33
# Restore temporary backup for other branches content.
40
34
mv ./branches " ${gh_pages_dir} /"
41
35
else
36
+ # Patch html files to tell search engine bots like google-bot not to index this content.
37
+ # More info: https://developers.google.com/search/docs/advanced/crawling/block-indexing
38
+ find $site_src -name ' *.html' -exec sed -i ' s/<head>/<head><meta name="robots" content="noindex, nofollow">/g' {}
39
+
42
40
branch_slug=$( slugify $git_branch )
43
41
site_dest=" ${gh_pages_dir} /branches/${branch_slug} "
44
42
You can’t perform that action at this time.
0 commit comments