diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index ec5264f..e8c9f9f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -10,9 +10,27 @@ on: jobs: publish: runs-on: ubuntu-latest + env: + cache-key: nostr-geotags-docs permissions: contents: write steps: + - name: Restore Cache + id: cache-exists + uses: actions/cache/restore@v3 + with: + path: ./cache + key: ${{ env.cache-key }} + + - name: Delete Previous Cache + if: ${{ steps.cache-restore.outputs.cache-hit }} + continue-on-error: true + run: | + gh extension install actions/gh-actions-cache + gh actions-cache delete "${{ env.cache-key }}" --confirm + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 - name: Set up Node.js @@ -38,7 +56,7 @@ jobs: uses: actions/cache/save@v3 with: path: docs - key: nostr-geotags-docs + key: ${{ env.cache-key }} - name: Change branch run: git fetch --all && git checkout gh-pages @@ -51,7 +69,7 @@ jobs: id: cache-restore with: path: docs - key: nostr-geotags-docs + key: ${{ env.cache-key }} fail-on-cache-miss: true - name: Configure Git