diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c0bb02c..0c23ace 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,6 +48,14 @@ jobs: env: VITE_BASE: /DogAgilityCourseMakerPOC2/ + - name: Nettoyer les artefacts Pages des tentatives précédentes + env: + GH_TOKEN: ${{ github.token }} + run: | + for artifact_id in $(gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts" --jq '.artifacts[] | select(.name == "github-pages") | .id'); do + gh api --method DELETE "repos/${GITHUB_REPOSITORY}/actions/artifacts/${artifact_id}" + done + - name: Préparer l'artefact Pages uses: actions/upload-pages-artifact@v5 with: