This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
Create mkdocs.yml #1
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 | |
- dev | |
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 --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E 'mkdocs.yml|docs/'; then | |
echo "::set-output name=changes::true" | |
else | |
echo "::set-output name=changes::false" | |
fi | |
- name: Install dependencies (if needed) | |
if: steps.check_changes.outputs.changes == 'true' | |
run: pip install mkdocs-material | |
- name: Deploy (if needed) | |
if: steps.check_changes.outputs.changes == 'true' | |
run: mkdocs gh-deploy --force | |