Skip to content

Commit 6c38927

Browse files
committed
chore: switch to pnpm
1 parent fc383cf commit 6c38927

File tree

3 files changed

+5622
-17652
lines changed

3 files changed

+5622
-17652
lines changed

.github/workflows/deploy.yml

+37-37
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,32 @@ on:
88
permissions:
99
contents: read
1010
pages: write
11-
id-token: write
1211

1312
jobs:
1413
build:
1514
runs-on: ubuntu-latest
16-
env:
17-
GITHUB_TOKEN: ${{github.token}}
15+
strategy:
16+
matrix:
17+
node-version: [20]
18+
timeout-minutes: 15
1819
steps:
1920
- name: Checkout
2021
uses: actions/checkout@v3
2122
with:
2223
fetch-depth: 0
2324

24-
- name: Cache dependencies
25-
uses: actions/cache@v3
26-
id: npm-cache
27-
env:
28-
cache-name: npm-cache
25+
- uses: pnpm/action-setup@v3
2926
with:
30-
path: "**/node_modules"
31-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
27+
version: 8
3228

33-
- name: Install dependencies
34-
if: steps.npm-cache.outputs.cache-hit != 'true'
35-
run: npm ci
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
cache: "pnpm"
34+
35+
- name: Install Dependencies
36+
run: pnpm install
3637

3738
- name: Install Playwright (for MermaidJS)
3839
run: npx playwright install --with-deps chromium
@@ -48,59 +49,58 @@ jobs:
4849
test:
4950
needs: build
5051
runs-on: ubuntu-latest
51-
env:
52-
GITHUB_TOKEN: ${{github.token}}
53-
timeout-minutes: 60
52+
strategy:
53+
matrix:
54+
node-version: [20]
55+
timeout-minutes: 15
5456
steps:
55-
- uses: actions/checkout@v3
57+
- name: Checkout
58+
uses: actions/checkout@v3
5659

57-
- uses: actions/setup-node@v3
60+
- name: Use Node.js ${{ matrix.node-version }}
61+
uses: actions/setup-node@v3
5862
with:
59-
node-version: 18
63+
node-version: ${{ matrix.node-version }}
64+
cache: "pnpm"
6065

61-
- uses: actions/download-artifact@v3
62-
name: Retrieve output from build step
66+
- name: Retrieve output from build step
67+
uses: actions/download-artifact@v3
6368
with:
6469
name: github-pages
6570
path: ./website-build
6671

67-
- run: |
72+
- name: Decompress build step output
73+
run: |
6874
mkdir -p ./dist
6975
tar -xf ./website-build/artifact.tar -C ./dist/ --strip-components=1
70-
name: Decompress build step output
71-
72-
- name: Cache dependencies
73-
uses: actions/cache@v3
74-
id: npm-cache
75-
env:
76-
cache-name: npm-cache
77-
with:
78-
path: "**/node_modules"
79-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
8076
81-
- name: Install dependencies
82-
if: steps.npm-cache.outputs.cache-hit != 'true'
83-
run: npm ci
77+
- name: Install Dependencies
78+
run: pnpm install
8479

8580
- name: Install Playwright Browsers
8681
run: npx playwright install --with-deps chromium firefox
8782

8883
- name: Run Playwright tests
8984
run: npx playwright test
9085

91-
- uses: actions/upload-artifact@v3
86+
- name: Upload Test Results
87+
uses: actions/upload-artifact@v3
9288
if: always()
9389
with:
9490
name: playwright-report
9591
path: playwright-report/
9692
retention-days: 30
9793

9894
deploy:
99-
needs: test
95+
needs:
96+
- build
97+
- test
98+
if: false
10099
runs-on: ubuntu-latest
101100
environment:
102101
name: github-pages
103102
url: ${{ steps.deployment.outputs.page_url }}
103+
timeout-minutes: 10
104104
steps:
105105
- name: Deploy to GitHub Pages
106106
id: deployment

0 commit comments

Comments
 (0)