docs: Enhance GitHub Actions documentation deployment workflow

- Improve documentation deployment process with more robust Git configuration
- Add explicit Git user setup for GitHub Actions
- Modify deployment script to create a clean gh-pages branch
- Ensure precise documentation site generation and deployment
This commit is contained in:
jango-blockchained
2025-02-05 12:46:17 +01:00
parent 13a27e1d00
commit e49d31d725

View File

@@ -21,5 +21,18 @@ jobs:
pip install mkdocs-material
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocstrings[python]
- name: Deploy
run: mkdocs gh-deploy --force
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Build docs
run: mkdocs build
- name: Deploy to GitHub Pages
run: |
git checkout --orphan gh-pages
git rm -rf .
mv site/* .
rm -rf site
git add .
git commit -m "docs: Update documentation"
git push origin gh-pages --force