Skip to content

Commit 8eeec52

Browse files
committed
fix: deploy.yml
1 parent 4bd7313 commit 8eeec52

1 file changed

Lines changed: 27 additions & 29 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ on:
44
push:
55
branches:
66
- main
7-
workflow_dispatch: # 允许手动触发
7+
workflow_dispatch:
88

9-
# 设置 GITHUB_TOKEN 的权限
109
permissions:
1110
contents: read
1211
pages: write
1312
id-token: write
1413

15-
# 只允许一个并发部署
1614
concurrency:
1715
group: "pages"
1816
cancel-in-progress: false
@@ -23,48 +21,48 @@ jobs:
2321

2422
steps:
2523
- name: Checkout
26-
uses: actions/checkout@v4
24+
uses: actions/checkout@v4
2725

2826
- name: Setup Node.js
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: '20'
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
3230

3331
- name: Setup pnpm
34-
uses: pnpm/action-setup@v2
35-
with:
36-
version: 8
32+
uses: pnpm/action-setup@v2
33+
with:
34+
version: 8
3735

3836
- name: Get pnpm store directory
39-
id: pnpm-cache
40-
shell: bash
41-
run: |
42-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
37+
id: pnpm-cache
38+
shell: bash
39+
run: |
40+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
4341
4442
- name: Setup pnpm cache
45-
uses: actions/cache@v3
46-
with:
47-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
48-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49-
restore-keys: |
50-
${{ runner.os }}-pnpm-store-
43+
uses: actions/cache@v3
44+
with:
45+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
46+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-pnpm-store-
5149
5250
- name: Install dependencies
53-
run: pnpm install
51+
run: pnpm install
5452

5553
- name: Build packages
56-
run: pnpm build
54+
run: pnpm build
5755

5856
- name: Build site
59-
run: pnpm build:site
57+
run: pnpm build:site
6058

6159
- name: Create .nojekyll for GitHub Pages
62-
run: touch packages/cosmic-web/dist/.nojekyll
60+
run: touch packages/cosmic-web/dist/.nojekyll
6361

6462
- name: Upload artifact
65-
uses: actions/upload-pages-artifact@v3
66-
with:
67-
path: './packages/cosmic-web/dist'
63+
uses: actions/upload-pages-artifact@v3
64+
with:
65+
path: './packages/cosmic-web/dist'
6866

6967
deploy:
7068
environment:
@@ -74,5 +72,5 @@ jobs:
7472
needs: build
7573
steps:
7674
- name: Deploy Documentation
77-
id: deployment
78-
uses: actions/deploy-pages@v4
75+
id: deployment
76+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)