Update mkdocs.yml

This commit is contained in:
Antonio Navarro Perez 2021-10-07 19:36:25 +02:00 committed by GitHub
parent 012c93d804
commit 9d1fcaa827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,16 +56,17 @@ jobs:
- name: Deploy docs (Latest) - name: Deploy docs (Latest)
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
working-directory: ./mkdocs
run: | run: |
echo "${CUSTOM_DOMAIN}" > "${GITHUB_WORKSPACE}/mkdocs/docs/CNAME" echo "${CUSTOM_DOMAIN}" > "${GITHUB_WORKSPACE}/mkdocs/docs/CNAME"
echo -e "User-agent: *\nDisallow: /v*.*/\nSitemap: https://${CUSTOM_DOMAIN}/sitemap.xml" > "${GITHUB_WORKSPACE}/mkdocs/docs/robots.txt" echo -e "User-agent: *\nDisallow: /v*.*/\nSitemap: https://${CUSTOM_DOMAIN}/sitemap.xml" > "${GITHUB_WORKSPACE}/mkdocs/docs/robots.txt"
git fetch origin gh-pages --verbose git fetch origin gh-pages --verbose
mike deploy . -t "Cloud (Latest)" --config-file "${GITHUB_WORKSPACE}/mkdocs/mkdocs.yml" --push --rebase mike deploy latest -t "Cloud (Latest)" --config-file "${GITHUB_WORKSPACE}/mkdocs/mkdocs.yml" --push --rebase
env: env:
CUSTOM_DOMAIN: docs.codacy.com CUSTOM_DOMAIN: distribyted.com
- name: Deploy docs (Self-hosted) - name: Deploy docs (Self-hosted)
if: startsWith(github.ref, 'refs/heads/release/v') if: startsWith(github.ref, 'refs/heads/release/v')
run: | run: |
git fetch origin gh-pages --verbose git fetch origin gh-pages --verbose
mike deploy ${GITHUB_REF##*/release/} -t "Self-hosted ${GITHUB_REF##*/release/}" --config-file "${GITHUB_WORKSPACE}/mkdocs.yml" --push --rebase mike deploy ${GITHUB_REF##*/release/} -t "Self-hosted ${GITHUB_REF##*/release/}" --config-file "${GITHUB_WORKSPACE}/mkdocs/mkdocs.yml" --push --rebase