From 12547ba0fef4783189db0d3b5de23220ad45797d Mon Sep 17 00:00:00 2001 From: brecert Date: Tue, 14 Sep 2021 00:03:58 -0400 Subject: [PATCH] Improve preview cleanup interpolation --- .github/workflows/preview_cleanup.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview_cleanup.yml b/.github/workflows/preview_cleanup.yml index 9eb68100..93c4e1aa 100644 --- a/.github/workflows/preview_cleanup.yml +++ b/.github/workflows/preview_cleanup.yml @@ -11,6 +11,8 @@ jobs: clean: runs-on: ubuntu-latest if: github.event.label.name == 'use-preview' + env: + BASE: refs/pull/${{ github.event.pull_request.number }} steps: - uses: actions/checkout@v2 @@ -19,7 +21,7 @@ jobs: persist-credentials: false - name: clean previews - run: 'rm -rf "./refs/pull/${{ github.event.pull_request.number }}"' + run: rm -rf "$BASE" - name: publish cleaned previews uses: JamesIves/github-pages-deploy-action@4.1.5