From cc13f6b15cfddcddc934dde89aaa6b827e0f7ef8 Mon Sep 17 00:00:00 2001 From: JANSSENB Date: Tue, 6 Aug 2024 16:55:42 +0200 Subject: [PATCH] Test to deploy documentation HTML to dedicated branch --- .github/workflows/publish.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e0b2b27..b206b06 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,6 +35,11 @@ jobs: uses: actions/upload-pages-artifact@v1 with: path: "_build" + - name: Upload build folder + uses: actions/upload-artifact@v3 + with: + name: build-folder + path: "_build" deploy-documentation: runs-on: ubuntu-latest @@ -48,4 +53,27 @@ jobs: steps: - name: Deploy to GitHub pages id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v2 + + deploy-documentation-branch: + runs-on: ubuntu-latest + needs: build-documentation + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set Git config + run: | + git config --local user.email "actions@github.com" + git config --local user.name "Github Actions" + - name: Create git subtree + run: git subtree add --prefix _build origin docportal + + - name: Download build folder + uses: actions/download-artifact@v3 + with: + name: build-folder + path: _build + + - name: Commit + run: git add _build && git commit -m "build - production deploy" && git subtree push --prefix _build origin docportal \ No newline at end of file