Skip to content

Commit 31e8683

Browse files
committed
use crazy-max
edit after build add contents write add path-prefix use peaceiris rework install setup rebuild gatsby again update config and deployment Add actions bot back to peace iris
1 parent c5f4697 commit 31e8683

File tree

4 files changed

+27
-45
lines changed

4 files changed

+27
-45
lines changed

.github/workflows/deploy.yaml

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,34 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy specification
22

33
on:
44
push:
55
branches:
66
- main
7-
workflow_dispatch:
87

9-
jobs:
10-
build:
11-
name: Build Docs
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
with:
16-
fetch-depth: 0
17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: 20
20-
cache: npm
8+
env:
9+
# this avoids node running out of memory while building
10+
NODE_OPTIONS: --max_old_space_size=20480
2111

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
12+
jobs:
13+
deploy-gh-pages:
4014
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 }}
15+
pages: write
16+
id-token: write
17+
contents: write
4818

4919
runs-on: ubuntu-latest
5020
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js 22
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '22'
26+
- run: npm ci
27+
- run: npm run build
28+
- run: npm run build:docs
5129
- name: Deploy to GitHub Pages
52-
id: deployment
53-
uses: actions/deploy-pages@v4
30+
uses: peaceiris/actions-gh-pages@v4
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: build/docs/gatsby/public
34+
commit_message: "Deploy to GitHub Pages"

docs/config/gatsby-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
siteMetadata: {
44
title: 'Ethereum JSON-RPC Specification',
55
description: 'A specification of the standard interface for Ethereum clients.',
6-
siteUrl: 'https://open-rpc.org',
6+
siteUrl: 'https://acolytec3.github.io/execution-apis',
77
logoUrl: 'https://raw.githubusercontent.com/open-rpc/design/master/icons/open-rpc-logo-noText/open-rpc-logo-noText%20(PNG)/256x256.png',
88
primaryColor: '#3f51b5', //material-ui primary color
99
secondaryColor: '#f50057', //material-ui secondary color
@@ -46,7 +46,7 @@ module.exports = {
4646
options: {
4747
name: 'pristine-site',
4848
short_name: 'pristine-site',
49-
start_url: '/',
49+
start_url: '/execution-apis/',
5050
background_color: 'transparent',
5151
theme_color: '#3f51b5',
5252
display: 'minimal-ui',

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"scripts": {
77
"build": "npm run build:spec",
88
"build:spec": "node scripts/build.js",
9-
"build:docs": "npm run generate-clients && npm run build:docs:gatsby && npm run copy-docs",
10-
"build:docs:gatsby": "cd build/docs/gatsby && npm install && gatsby build --prefix-paths",
9+
"build:docs": "npm run generate-clients && npm run build:docs:gatsby",
10+
"build:docs:gatsby": " npm run copy-docs && cd build/docs/gatsby && npm install && gatsby build --prefix-paths",
1111
"lint": "node scripts/build.js && node scripts/validate.js && node scripts/graphql-validate.js",
1212
"clean": "rm -rf build && mkdir -p build",
1313
"copy-docs": "node scripts/prepare-docs.js",

0 commit comments

Comments
 (0)