8
8
permissions :
9
9
contents : read
10
10
pages : write
11
- id-token : write
12
11
13
12
jobs :
14
13
build :
15
14
runs-on : ubuntu-latest
16
- env :
17
- GITHUB_TOKEN : ${{github.token}}
15
+ strategy :
16
+ matrix :
17
+ node-version : [20]
18
+ timeout-minutes : 15
18
19
steps :
19
20
- name : Checkout
20
21
uses : actions/checkout@v3
21
22
with :
22
23
fetch-depth : 0
23
24
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
29
26
with :
30
- path : " **/node_modules"
31
- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
27
+ version : 8
32
28
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
36
37
37
38
- name : Install Playwright (for MermaidJS)
38
39
run : npx playwright install --with-deps chromium
@@ -48,59 +49,58 @@ jobs:
48
49
test :
49
50
needs : build
50
51
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
54
56
steps :
55
- - uses : actions/checkout@v3
57
+ - name : Checkout
58
+ uses : actions/checkout@v3
56
59
57
- - uses : actions/setup-node@v3
60
+ - name : Use Node.js ${{ matrix.node-version }}
61
+ uses : actions/setup-node@v3
58
62
with :
59
- node-version : 18
63
+ node-version : ${{ matrix.node-version }}
64
+ cache : " pnpm"
60
65
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
63
68
with :
64
69
name : github-pages
65
70
path : ./website-build
66
71
67
- - run : |
72
+ - name : Decompress build step output
73
+ run : |
68
74
mkdir -p ./dist
69
75
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') }}
80
76
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
84
79
85
80
- name : Install Playwright Browsers
86
81
run : npx playwright install --with-deps chromium firefox
87
82
88
83
- name : Run Playwright tests
89
84
run : npx playwright test
90
85
91
- - uses : actions/upload-artifact@v3
86
+ - name : Upload Test Results
87
+ uses : actions/upload-artifact@v3
92
88
if : always()
93
89
with :
94
90
name : playwright-report
95
91
path : playwright-report/
96
92
retention-days : 30
97
93
98
94
deploy :
99
- needs : test
95
+ needs :
96
+ - build
97
+ - test
98
+ if : false
100
99
runs-on : ubuntu-latest
101
100
environment :
102
101
name : github-pages
103
102
url : ${{ steps.deployment.outputs.page_url }}
103
+ timeout-minutes : 10
104
104
steps :
105
105
- name : Deploy to GitHub Pages
106
106
id : deployment
0 commit comments