This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
Update mkdocs.yml #5
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: MkDocs Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check for changes in mkdocs.yml or docs folder | |
id: check_changes | |
run: | | |
if git diff-tree --name-only -r ${{ github.event.before }} ${{ github.sha }} | grep -E 'mkdocs.yml|docs/'; then | |
echo "CHANGES=true" >> $GITHUB_ENV | |
else | |
echo "CHANGES=false" >> $GITHUB_ENV | |
fi | |
- name: Install dependencies (if needed) | |
if: env.CHANGES == 'true' | |
run: pip install mkdocs-material | |
- name: Deploy (if needed) | |
if: env.CHANGES == 'true' | |
run: mkdocs gh-deploy --force | |