Skip to content

Commit 3cb5c19

Browse files
committed
update github workflow
1 parent d26484b commit 3cb5c19

File tree

2 files changed

+37
-24
lines changed

2 files changed

+37
-24
lines changed

.github/workflows/deploy.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,44 @@ jobs:
1313

1414
runs-on: ${{ matrix.os }}
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: pnpm/[email protected]
18-
with:
19-
version: '7'
16+
- uses: actions/checkout@v3
17+
2018
- name: Setup Node
21-
uses: actions/setup-node@v2
19+
uses: actions/setup-node@v3
2220
with:
2321
node-version: ${{ matrix.node-version }}
2422
cache: 'pnpm'
23+
24+
- uses: pnpm/action-setup@v2
25+
name: Install pnpm
26+
id: pnpm-install
27+
with:
28+
version: 'latest'
29+
run_install: false
2530

26-
- name: Get pnpm cache directory
31+
- name: Get pnpm store directory
2732
id: pnpm-cache
2833
shell: bash
29-
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
34+
run: |
35+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
3036
31-
- name: Setup pnpm cache
32-
uses: actions/cache@v3
37+
- uses: actions/cache@v3
38+
name: Setup pnpm cache
3339
with:
34-
path: ${{ steps.pnpm-cache.outputs.dir }}
40+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
3541
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
3642
restore-keys: |
3743
${{ runner.os }}-pnpm-store-
3844
39-
- name: Install Dependencies
45+
- name: Install dependencies
4046
run: pnpm install
4147

4248
- name: Build
4349
run: pnpm build:docs
4450

4551
- name: Deploy to GitHub Pages
4652
if: success()
47-
uses: crazy-max/ghaction-github-pages@v2
53+
uses: crazy-max/ghaction-github-pages@v3
4854
with:
4955
target_branch: gh-pages
5056
build_dir: doc-site/dist

.github/workflows/test.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,45 @@ jobs:
2222
runs-on: ${{ matrix.os }}
2323
# ref: https://playwright.dev/docs/ci#github-actions
2424
steps:
25-
- uses: actions/checkout@v2
26-
- uses: pnpm/[email protected]
27-
with:
28-
version: '7'
25+
- uses: actions/checkout@v3
26+
2927
- name: Setup Node
30-
uses: actions/setup-node@v2
28+
uses: actions/setup-node@v3
3129
with:
3230
node-version: ${{ matrix.node-version }}
3331
cache: 'pnpm'
32+
33+
- uses: pnpm/action-setup@v2
34+
name: Install pnpm
35+
id: pnpm-install
36+
with:
37+
version: 'latest'
38+
run_install: false
3439

35-
- name: Get pnpm cache directory
40+
- name: Get pnpm store directory
3641
id: pnpm-cache
3742
shell: bash
38-
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
43+
run: |
44+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
3945
40-
- name: Setup pnpm cache
41-
uses: actions/cache@v3
46+
- uses: actions/cache@v3
47+
name: Setup pnpm cache
4248
with:
43-
path: ${{ steps.pnpm-cache.outputs.dir }}
49+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
4450
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
4551
restore-keys: |
4652
${{ runner.os }}-pnpm-store-
4753
48-
- name: Install Dependencies
54+
- name: Install dependencies
4955
run: pnpm install
56+
5057
- name: Install Playwright
5158
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
5259
- name: Run tests
5360
run: pnpm test
5461
- name: Upload test results
5562
if: always()
56-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-artifact@v3
5764
with:
5865
name: ${{ matrix.browser }}-${{ matrix.os }}-playwright-report
5966
path: playwright-report

0 commit comments

Comments
 (0)