feat: update ci to cache pnpm and rust
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m40s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m40s
This commit is contained in:
27
.github/workflows/deploy.yaml
vendored
27
.github/workflows/deploy.yaml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user