@@ -11,16 +11,16 @@ permissions:
11
11
id-token : write
12
12
13
13
jobs :
14
- test :
14
+ build :
15
15
runs-on : ubuntu-latest
16
16
env :
17
17
GITHUB_TOKEN : ${{github.token}}
18
- timeout-minutes : 60
19
18
steps :
20
- - uses : actions/checkout@v3
21
- - uses : actions/setup-node @v3
19
+ - name : Checkout
20
+ uses : actions/checkout @v3
22
21
with :
23
- node-version : 18
22
+ fetch-depth : 0
23
+
24
24
- name : Cache dependencies
25
25
uses : actions/cache@v3
26
26
id : npm-cache
@@ -29,30 +29,45 @@ jobs:
29
29
with :
30
30
path : " **/node_modules"
31
31
key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
32
+
32
33
- name : Install dependencies
33
34
if : steps.npm-cache.outputs.cache-hit != 'true'
34
35
run : npm ci
35
- - name : Install Playwright Browsers
36
- run : npx playwright install --with-deps chromium firefox
37
- - name : Run Playwright tests
38
- run : npx playwright test
39
- - uses : actions/upload-artifact@v3
40
- if : always()
36
+
37
+ - name : Install Playwright (for MermaidJS)
38
+ run : npx playwright install --with-deps chromium
39
+
40
+ - name : Build Website
41
+ run : npm run build
42
+
43
+ - name : Upload Built Website
44
+ uses : actions/upload-pages-artifact@v1
41
45
with :
42
- name : playwright-report
43
- path : playwright-report/
44
- retention-days : 30
46
+ path : ./dist/
45
47
46
- build :
47
- needs : test
48
+ test :
49
+ needs : build
48
50
runs-on : ubuntu-latest
49
51
env :
50
52
GITHUB_TOKEN : ${{github.token}}
53
+ timeout-minutes : 60
51
54
steps :
52
- - name : Checkout
53
- uses : actions/checkout@v3
55
+ - uses : actions/checkout@v3
56
+
57
+ - uses : actions/setup-node@v3
54
58
with :
55
- fetch-depth : 0
59
+ node-version : 18
60
+
61
+ - uses : actions/download-artifact@v3
62
+ name : Retrieve output from build step
63
+ with :
64
+ name : github-pages
65
+ path : ./website-build
66
+
67
+ - run : |
68
+ mkdir -p ./dist
69
+ tar -xf ./website-build/artifact.tar -C ./dist/ --strip-components=1
70
+ name: Decompress build step output
56
71
57
72
- name : Cache dependencies
58
73
uses : actions/cache@v3
@@ -62,20 +77,26 @@ jobs:
62
77
with :
63
78
path : " **/node_modules"
64
79
key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
80
+
65
81
- name : Install dependencies
66
82
if : steps.npm-cache.outputs.cache-hit != 'true'
67
83
run : npm ci
68
- - name : Install Playwright (for MermaidJS)
69
- run : npx playwright install --with-deps chromium
70
- - name : Build Website
71
- run : npm run build
72
- - name : Upload Built Website
73
- uses : actions/upload-pages-artifact@v1
84
+
85
+ - name : Install Playwright Browsers
86
+ run : npx playwright install --with-deps chromium firefox
87
+
88
+ - name : Run Playwright tests
89
+ run : npx playwright test
90
+
91
+ - uses : actions/upload-artifact@v3
92
+ if : always()
74
93
with :
75
- path : ./dist/
94
+ name : playwright-report
95
+ path : playwright-report/
96
+ retention-days : 30
76
97
77
98
deploy :
78
- needs : build
99
+ needs : test
79
100
runs-on : ubuntu-latest
80
101
environment :
81
102
name : github-pages
0 commit comments