diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3413fea..7719e43 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -12,8 +12,33 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # Cache Rust compilation (cargo + target) + - name: Cache Rust build + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + # Prepare pnpm cache (store path) + - name: Get pnpm store path + id: pnpm-cache + run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: build run: pnpm run build:deploy