pipeline fixed #7
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 Publish | |
on: | |
push: | |
branches: | |
- main # Change this to your main branch name | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: | | |
poetry install --no-root | |
- name: Build and deploy | |
run: | | |
poetry run mkdocs build --verbose | |
- name: Deploy to GitHub Pages | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add . | |
git commit -m "Deploy MkDocs to GitHub Pages" | |
git branch -M gh-pages | |
git push origin gh-pages --force | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |