[#182] Adding mkdocs.yml file for MkDocs page generation and GitHub Pages deployment #4
Workflow file for this run
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: Update Docs | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ^3.8.5 | |
- name: Check for changes in docs/ and deploy | |
run: | | |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q "^docs/"; then | |
echo "Changes detected in docs/" | |
pip install poetry | |
poetry install --only doc | |
mkdocs gh-deploy | |
else | |
echo "No changes detected in docs/" | |
fi | |
- name: Clean up | |
run: rm -rf site/ |