From e0cec168eb099a8dce47bd4215c2f3c02382f91d Mon Sep 17 00:00:00 2001 From: Peter MIKOLA Date: Fri, 23 Aug 2024 13:14:12 +0200 Subject: [PATCH] modify doc generation workflow --- .github/workflows/doc.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index a02916f..49ae3c5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -54,33 +54,30 @@ jobs: runs-on: ubuntu-latest needs: build steps: + - name: Download `doc` + uses: actions/download-artifact@v4 + with: + name: doc + path: artifact + - name: Checkout `docs` repository uses: actions/checkout@v4 with: repository: versotile-org/docs.versotile.org ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }} - ref: docs - - - name: Clean up docs directory - run: | - cp {docs/,}index.html - rm -r docs/* - mv index.html docs/ - cp CNAME docs/ - - - name: Download `doc` - uses: actions/download-artifact@v4 - with: - name: doc path: docs - - name: Configure Git + - name: Configure git, commit changes and PUSH run: | + cd docs/ git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Commit and push - run: | - git add docs + git fetch origin docs:docs + git checkout docs -- + rm -r docs/* + mv ../artifact/* docs/ + git add docs/ + git checkout main docs/ + git status git commit -m ":rocket: update docs from \`verso\` repository" - git push origin docs + # git push origin docs