Skip to content

Commit 09f2dc5

Browse files
committedDec 27, 2024
Update pages.yml
1 parent a2b6672 commit 09f2dc5

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed
 

‎.github/workflows/pages.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
name: github pages
55

6-
on: [push]
6+
on:
7+
push:
8+
branches:
9+
- main
710

811
jobs:
912

@@ -12,14 +15,26 @@ jobs:
1215
permissions:
1316
contents: write
1417
steps:
15-
- uses: actions/checkout@v4
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
22+
- name: Setup Node.js
1623
- uses: actions/setup-node@v4
1724
with:
1825
node-version: current
1926
registry-url: https://registry.npmjs.org/
20-
- run: npm install --production
21-
- run: npm run build
22-
- name: Deploy
27+
cache: pnpm
28+
- name: Cache pnpm dependencies
29+
uses: actions/cache@v3
30+
with:
31+
path: ~/.pnpm-store
32+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
33+
restore-keys: |
34+
${{ runner.os }}-pnpm-store-
35+
- run: pnpm install --frozen-lockfile
36+
- run: pnpm run build
37+
- name: Deploy to GitHub Pages
2338
uses: peaceiris/actions-gh-pages@v3
2439
with:
2540
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
Failed to load comments.