From 8b54208e03ad30838fd3f8f6ff8c5656618c8405 Mon Sep 17 00:00:00 2001 From: Ricardo Branco Date: Tue, 11 Jun 2024 15:24:48 +0200 Subject: [PATCH] Cleanup old deployments --- .github/workflows/page.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/page.yml b/.github/workflows/page.yml index 0783953..6583ad5 100644 --- a/.github/workflows/page.yml +++ b/.github/workflows/page.yml @@ -25,6 +25,16 @@ concurrency: cancel-in-progress: false jobs: + cleanup: + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Delete deployment + uses: strumwolf/delete-deployment-environment@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: github-pages + onlyRemoveDeployments: true deploy: environment: name: github-pages @@ -75,3 +85,4 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 + needs: cleanup