From e49d31d7256eef7ac198c0fc0503bb9ec132f652 Mon Sep 17 00:00:00 2001 From: jango-blockchained Date: Wed, 5 Feb 2025 12:46:17 +0100 Subject: [PATCH] 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 --- .github/workflows/deploy-docs.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 26c0676..d4d77d6 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -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 \ No newline at end of file + - 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 \ No newline at end of file