@@ -3,32 +3,51 @@ name: Deploy to GitHub Pages
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - openrpc-v2
7
7
workflow_dispatch :
8
8
9
- env :
10
- # this avoids node running out of memory while building
11
- NODE_OPTIONS : --max_old_space_size=20480
12
-
13
9
jobs :
14
- deploy-gh-pages :
10
+ build :
11
+ name : Build Docs
15
12
runs-on : ubuntu-latest
16
- permissions :
17
- pages : write
18
13
steps :
19
14
- uses : actions/checkout@v4
20
- - name : Use Node.js 22
21
- uses : actions/setup-node@v4
22
15
with :
23
- node-version : ' 22'
24
- - run : npm ci
25
- - run : npm run build
26
- - run : npm run build:docs
27
- - name : Deploy to GitHub Pages
28
- if : success()
29
- uses : crazy-max/ghaction-github-pages@v4
16
+ fetch-depth : 0
17
+ - uses : actions/setup-node@v4
30
18
with :
31
- target_branch : gh-pages
32
- build_dir : build/docs/gatsby/public
33
- env :
34
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
+ node-version : 20
20
+ cache : npm
21
+
22
+ - name : Install dependencies
23
+ run : npm install --frozen-lockfile
24
+
25
+ - name : Build specs and website
26
+ run : |
27
+ npm run build
28
+ npm run build:docs
29
+
30
+ - name : Upload Build Artifact
31
+ uses : actions/upload-pages-artifact@v3
32
+ with :
33
+ path : build
34
+
35
+ deploy :
36
+ name : Deploy to GitHub Pages
37
+ needs : build
38
+
39
+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
40
+ permissions :
41
+ pages : write # to deploy to Pages
42
+ id-token : write # to verify the deployment originates from an appropriate source
43
+
44
+ # Deploy to the github-pages environment
45
+ environment :
46
+ name : github-pages
47
+ url : ${{ steps.deployment.outputs.page_url }}
48
+
49
+ runs-on : ubuntu-latest
50
+ steps :
51
+ - name : Deploy to GitHub Pages
52
+ id : deployment
53
+ uses : actions/deploy-pages@v4
0 commit comments