From 3f74228a127e3b6e75d09620563d274a69edce25 Mon Sep 17 00:00:00 2001 From: Magnus Persson Date: Sat, 8 Jan 2022 12:31:26 +0100 Subject: [PATCH] Switching checkin handler --- .github/workflows/doc-build.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/doc-build.yaml b/.github/workflows/doc-build.yaml index b133907..3ffe676 100644 --- a/.github/workflows/doc-build.yaml +++ b/.github/workflows/doc-build.yaml @@ -20,17 +20,21 @@ jobs: # .nojekyll file must exist in docs - - uses: EndBug/add-and-commit@v7 # You can change this to use a specific version. + - name: Commit documentation changes + run: | + git clone https://github.com/mp-se/gravitymon.git --branch docs --single-branch docs + cp -r docs/_build/html/* docs/ + cd docs + git config --local user.email "action@noreply.github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "Update documentation" -a || true + # The above command will fail if no changes were present, so we ignore + # the return code. + - name: Push changes + uses: ad-m/github-push-action@master with: - add: 'docs' - author_name: GitHub Action - author_email: magnus@users.noreply.github.com - branch: docs - - pull: 'NO-PULL' - branch_mode: create - default_author: github_actor - message: 'GitHub Action Build' - pathspec_error_handling: ignore - \ No newline at end of file + directory: docs + github_token: ${{ secrets.GITHUB_TOKEN }} +