Merge pull request #886 from syalioune/feature/gke-dns-connectivity #124
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
- '.github/workflows/docs.yaml' | |
- 'mkdocs.yml' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install mkdocs | |
run: pip install mkdocs-material | |
- name: Generate docs artifacts | |
run: mkdocs build -d /tmp/docs | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Publish docs artifacts to gh-pages | |
run: | | |
cd gh-pages | |
shopt -s extglob | |
rm -rf !(index.yaml|LICENSE|*.tgz) | |
cp -R /tmp/docs/** . | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Publish docs from $GITHUB_SHA" | |
git push https://github.com/$GITHUB_REPOSITORY.git gh-pages |