Skip to content

Commit 44365c0

Browse files
authored
Merge pull request #63 from rockoder/setup-script-and-visual-testing-11660978758164971452
feat: add setup script and migrate CI to pnpm
2 parents 2caf274 + a2e8a85 commit 44365c0

File tree

2 files changed

+198
-4
lines changed

2 files changed

+198
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,36 @@ jobs:
3636
uses: actions/setup-node@v4
3737
with:
3838
node-version: "20"
39-
cache: npm
40-
cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json
39+
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v4
42+
with:
43+
version: 10
44+
45+
- name: Get pnpm store directory
46+
shell: bash
47+
run: |
48+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
49+
50+
- name: Setup pnpm cache
51+
uses: actions/cache@v4
52+
with:
53+
path: ${{ env.STORE_PATH }}
54+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
55+
restore-keys: |
56+
${{ runner.os }}-pnpm-store-
4157
4258
- name: Setup Pages
4359
id: pages
4460
uses: actions/configure-pages@v5
4561

4662
- name: Install dependencies
47-
run: npm ci
63+
run: pnpm install --frozen-lockfile
4864
working-directory: ${{ env.BUILD_PATH }}
4965

5066
- name: Build with Astro
5167
run: |
52-
npm run build
68+
pnpm build
5369
working-directory: ${{ env.BUILD_PATH }}
5470

5571
- name: Upload artifact

package-lock.json

Lines changed: 178 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)