CI: update config & Housekeeping

This commit is contained in:
SukkaW
2023-09-11 16:37:26 +08:00
parent 96af39c40d
commit 7154701ec9
3 changed files with 57 additions and 72 deletions

View File

@@ -10,38 +10,22 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
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
- name: Use Node.js
uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: '.node-version'
cache: 'pnpm'
- run: pnpm i
- run: pnpm run build
- name: Deploy