From 8c06ab3c091ef8953d3a08713ae175cddc576099 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 20 Feb 2020 22:48:57 +0100 Subject: [PATCH] :wrench: delete [skip ci] --- .github/workflows/delete.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/delete.yml b/.github/workflows/delete.yml index aef841f6..52c6400c 100644 --- a/.github/workflows/delete.yml +++ b/.github/workflows/delete.yml @@ -1,4 +1,4 @@ -name: Coverage Report +name: Delete Obsolete Coverage Report on: [ delete ] @@ -10,12 +10,17 @@ jobs: steps: - name: Clone report repo run: | + echo ${{ github.event.ref_type }} echo ${{ github.event.ref }} git clone https://github.com/fennecdjay/gwion-coverage-report cd gwion-coverage-report branch=$(basename ${{ github.event.ref }}) - rm -r html/$branch - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git remote set-url origin https://${{ secrets.COVERAGE_TOKEN }}@github.com/fennecdjay/gwion-coverage-report.git - git add html && git commit -m "Delete obsolete branch" && git subtree push --prefix html origin gh-pages || true + if [ -d html/$branch ] + rm -r html/$branch + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git remote set-url origin https://${{ secrets.COVERAGE_TOKEN }}@github.com/fennecdjay/gwion-coverage-report.git + git add html + git commit -m "Delete obsolete branch" + git subtree push --prefix html origin gh-pages + fi -- 2.43.0