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 1212 fetch-depth : 0
1313 ref : hakyll
1414
15- - name : Remove stale deployments
15+ - name : Remove deployment for deleted branch
1616 run : |
1717 ./.github/workflows/deployment/delete.sh ${{ github.event.ref }}
1818 ./.github/workflows/deployment/update-deployments-list.sh
Original file line number Diff line number Diff line change @@ -7,12 +7,6 @@ set -eo pipefail
77script_dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd)
88source $script_dir /commons.sh
99
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-
1610deploy () {
1711 if [[ ! -z " $GITHUB_REF_NAME " ]]; then
1812 # The GITHUB_REF_NAME env variable is available in github actions.
@@ -39,6 +33,10 @@ deploy() {
3933 # Restore temporary backup for other branches content.
4034 mv ./branches " ${gh_pages_dir} /"
4135 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+
4240 branch_slug=$( slugify $git_branch )
4341 site_dest=" ${gh_pages_dir} /branches/${branch_slug} "
4442
You can’t perform that action at this time.
0 commit comments