From c8bb19e66ce397b25bef5076e7b980f0ee3684c4 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sun, 29 Sep 2019 21:59:32 +0200 Subject: [PATCH] Remove the folder on build server once PR is merged --- .github/workflows/cleanup_pr.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cleanup_pr.yml diff --git a/.github/workflows/cleanup_pr.yml b/.github/workflows/cleanup_pr.yml new file mode 100644 index 00000000000..9366f38c511 --- /dev/null +++ b/.github/workflows/cleanup_pr.yml @@ -0,0 +1,24 @@ +name: Cleanup after PR + +on: + pull_request: + types: [closed] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;](echo{GITHUB_REF#refs/heads/})" + id: extract_branch + - name: Delete folder on builds.jabref.org + uses: appleboy/ssh-action@v0.0.3 + with: + script: rm -rf www/${{ steps.extract_branch.outputs.branch }} + host: builds.jabref.org + username: builds_jabref_org + privateKey: ${{ secrets.buildJabRefPrivateKey }} + port: 9922