File tree Expand file tree Collapse file tree 2 files changed +9
-15
lines changed
Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -55,22 +55,16 @@ jobs:
5555 run : |
5656 npm run build
5757 npm run build:docs
58- - name : Build preview docs
58+ - name : Create preview build
5959 run : |
6060 cd build/docs/gatsby
61- npm install
62- # Backup original config
63- cp gatsby-config.js gatsby-config-original.js
64- # Modify config for preview
65- sed -i 's|pathPrefix: "/execution-apis"|pathPrefix: "/execution-apis/preview/PR${{ github.event.number }}"|g' gatsby-config.js
66- # Build with modified config
67- npx gatsby build --prefix-paths
68- # Restore original config
69- cp gatsby-config-original.js gatsby-config.js
70- # Move preview build to separate directory
71- mv public public-preview
72- # Rebuild main site
73- npx gatsby build --prefix-paths
61+ # Copy the built files for preview
62+ cp -r public public-preview
63+ # Fix paths in the preview build
64+ find public-preview -name "*.html" -exec sed -i 's|href="/execution-apis/|href="/execution-apis/preview/PR${{ github.event.number }}/|g' {} \;
65+ find public-preview -name "*.html" -exec sed -i 's|src="/execution-apis/|src="/execution-apis/preview/PR${{ github.event.number }}/|g' {} \;
66+ find public-preview -name "*.js" -exec sed -i 's|"/execution-apis/|"/execution-apis/preview/PR${{ github.event.number }}/|g' {} \;
67+ find public-preview -name "*.css" -exec sed -i 's|url(/execution-apis/|url(/execution-apis/preview/PR${{ github.event.number }}/|g' {} \;
7468 - name : Cache docs build output
7569 uses : actions/cache@v4
7670 with :
Original file line number Diff line number Diff line change 1- # Contributors Guide
1+ # Contributors Guide with cheese
22
33This guide will explain for new and experienced contributors alike how to
44propose changes to Ethereum JSON-RPC API.
You can’t perform that action at this time.
0 commit comments