From 607c554c1be62eab0fa87a56ddd5fa06544a1b0e Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:03:37 +0100 Subject: [PATCH 1/2] feat: adds allure-report to clean-exclude --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index c2a75f36f..93ae37cf2 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -65,7 +65,7 @@ jobs: GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} if [[ $GIT_BRANCH == "${{ github.event.repository.default_branch }}" ]]; then DEST_DIR="/" - CLEAN_EXCLUDE="/branch/*" + CLEAN_EXCLUDE="/branch/*\n/allure-action/*" else DEST_DIR="/branch/${GIT_BRANCH//[^a-zA-Z0-9_]/_}" CLEAN_EXCLUDE="/nothing" From 14418118eecc85c407d7f57a79b75b075483eccd Mon Sep 17 00:00:00 2001 From: kukkok3 <93382903+kukkok3@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:50:28 +0100 Subject: [PATCH 2/2] feat: adds cleanup for branch test reports --- .github/workflows/branch-pages-delete.yml | 24 +++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/branch-pages-delete.yml b/.github/workflows/branch-pages-delete.yml index d61134e07..9d401a5e7 100644 --- a/.github/workflows/branch-pages-delete.yml +++ b/.github/workflows/branch-pages-delete.yml @@ -1,5 +1,5 @@ name: Branch Pages Deleted -on: +on: workflow_call: inputs: earthfile: @@ -61,24 +61,22 @@ jobs: - name: Set env run: | GIT_BRANCH=$(echo ${{ github.event.ref }} | sed -e "s#refs/heads/##g") - DEST_DIR="branch/${GIT_BRANCH//[^a-zA-Z0-9_]/_}" + DEST_DIR_DOCS="branch/${GIT_BRANCH//[^a-zA-Z0-9_]/_}" + DEST_DIR_TESTS="allure-action/${GIT_BRANCH//[^a-zA-Z0-9_-]/_}" echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV - echo "DEST_DIR=$DEST_DIR" >> $GITHUB_ENV + echo "DEST_DIR_DOCS=$DEST_DIR_DOCS" >> $GITHUB_ENV + echo "DEST_DIR_TESTS=$DEST_DIR_TESTS" >> $GITHUB_ENV - name: Clean up run: | - echo "Clean up for branch ${{ env.GIT_BRANCH }} at ${{ env.DEST_DIR }}" + echo "Clean up for branch ${{ env.GIT_BRANCH }} at ${{ env.DEST_DIR_DOCS }} and ${{ env.DEST_DIR_TESTS }}" - - name: Get current published documentation - uses: actions/checkout@v3 - with: - ref: gh-pages - - - name: Remove branches draft docs + - name: Remove branches draft docs and test reports run: | - rm -rf ${{ env.DEST_DIR }} + rm -rf ${{ env.DEST_DIR_DOCS }} + rm -rf ${{ env.DEST_DIR_TESTS}} - - name: Save updated docs + - name: Save updated docs and test reports uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: Removed Draft Docs for ${{ env.GIT_BRANCH }} + commit_message: Removed draft docs and test reports for ${{ env.GIT_BRANCH }}