Skip to content

pnpm cache

pnpm cache #47

Workflow file for this run

name: pnpm cache
on:
workflow_dispatch:
schedule:
# Run every day at 01:00 UTC
- cron: '0 1 * * *'
jobs:
create-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
- name: Get pnpm cache info
id: pnpm-cache
run: |
echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
echo "date=$(/bin/date -u "+%Y-%m-%d")" >> $GITHUB_OUTPUT
- name: pnpm install
run: pnpm install
- name: Save pnpm cache
uses: actions/cache/save@v3
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.pnpm-cache.outputs.date }}