From 395d9e44cf3e172756fe86cc0364f2b1b55da302 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Thu, 14 Nov 2024 10:16:55 +0800 Subject: [PATCH] CI: enable cache for wrangler --- .github/workflows/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 861c6cd1..7330dbe7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -90,9 +90,18 @@ jobs: if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: + - name: Get NPM cache directory path + id: npm_cache_path + shell: sh + run: echo dir=$(npm config get cache) >> $GITHUB_OUTPUT + - name: Cache NPM cache + uses: actions/cache@v4 + with: + path: ${{ steps.npm_cache_path.outputs.dir }} + key: ${{ runner.os }}-deploy-to-cloudflare-npm - uses: actions/download-artifact@v4 with: - name: build-artifact-${{ github. ref_name }} + name: build-artifact-${{ github.ref_name }} path: public - name: Deploy to Cloudflare Pages uses: cloudflare/wrangler-action@v3