Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Test reports bugs #209

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .github/workflows/branch-pages-delete.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Branch Pages Deleted
on:
on:
workflow_call:
inputs:
earthfile:
Expand Down Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading