Update mkdocsDeploy.yml #14
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: Deploy MkDocs to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Adjust if your primary branch differs | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install mkdocs mkdocs-material # Ensure all dependencies are listed | |
- name: Custom Deploy to GitHub Pages | |
run: | | |
mkdocs build --clean | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git fetch --depth=1 origin gh-pages | |
git checkout -B gh-pages | |
git add -f site/* | |
git commit -m 'Deploy MkDocs Site' | |
git push -u origin gh-pages --force | |