Skip to content

Commit

Permalink
build: update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kuloud committed Jan 5, 2025
1 parent c584afb commit 565ca29
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages

on:
push:
branches: [ main ] # 设置要触发部署的分支
branches: [ main ]
workflow_dispatch:

permissions:
Expand All @@ -22,11 +22,30 @@ jobs:
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: npm install
run: pnpm install

- name: Build
run: npm run deploy
run: pnpm deploy

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down

0 comments on commit 565ca29

Please sign in to comment.