diff --git a/.github/workflows/buildpages.yml b/.github/workflows/buildpages.yml index 66c69d5..c251e84 100644 --- a/.github/workflows/buildpages.yml +++ b/.github/workflows/buildpages.yml @@ -36,3 +36,19 @@ jobs: mkdocs build --clean --site-dir "../docs/$name" -f "$mkdocs_file" done + + - name: Commit and push docs folder + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git add docs + + if git diff --cached --quiet; then + echo "No changes to commit." + else + git commit -m "Update built MkDocs documentation" + git push origin gh-pages + fi