We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59fa8e3 commit 0ad7043Copy full SHA for 0ad7043
.github/workflows/doc-build.yml
@@ -68,6 +68,13 @@ jobs:
68
make html
69
cd ..
70
71
+ # If it's main branch, add noindex tag to all .html files to exclude from Google Search indexing.
72
+ GITHUB_REF=${{ github.ref }}
73
+ echo "GitHub Ref: ${GITHUB_REF}"
74
+ if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then
75
+ find docs/_build/html/ -name "*.html" -print0 | xargs -0 sed -i '/<head>/a \ \ <meta name="robots" content="noindex">';
76
+ fi
77
+
78
cp -rf docs/_build/html/* "${RUNNER_DOCS_DIR}"
79
80
mv docs/_build/html "${RUNNER_ARTIFACT_DIR}"
0 commit comments