docs #666
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: | |
workflow_run: | |
workflows: ["tests"] | |
branches: [main] | |
types: [completed] | |
jobs: | |
docs: | |
name: Deploy docs | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin | |
- name: Build and deploy docs | |
run: mkdocs gh-deploy --force | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Download Coverage Report | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: tests.yml | |
name: coverage | |
path: coverage | |
search_artifacts: true | |
- name: Push Coverage Report | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add coverage | |
git diff --staged --quiet || git commit -m "add coverage report" | |
git push |