This commit is contained in:
Ryan Yin 2023-06-23 16:41:46 +08:00
parent 45e520cb87
commit b090384c4e

View file

@ -19,10 +19,34 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# setup nodejs, pnpm and vitepress
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
# build and deploy the docs
- run: npm ci
- name: Build
run: npm run docs:build