Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v6
with:
Expand All @@ -38,6 +40,17 @@ jobs:
- name: Install JS dependencies
run: npm ci

- name: Create versioned doc snapshots
run: |
VERSIONS=$(node -e "console.log(require('./api_versions.json').join('\n'))")
if [ -n "$VERSIONS" ]; then
for VERSION in $VERSIONS; do
git checkout "refs/tags/$VERSION" -- docs-api/
npm run docs:version -- "$VERSION"
done
git checkout HEAD -- docs-api/
fi

- name: Build docs
run: npm run build:docs

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
release:
types: [published]

permissions:
contents: write

jobs:
attach-openrpc-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v6
with:
go-version: ^1.26
id: go

- name: Build the spec
run: make build

- name: Upload OpenRPC spec to release
run: |
gh release upload ${{ github.event.release.tag_name }} openrpc.json refs-openrpc.json
env:
GH_TOKEN: ${{ github.token }}
1 change: 1 addition & 0 deletions api_versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
8 changes: 8 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ const config: Config = {
path: 'docs-api',
routeBasePath: '/',
sidebarPath: './docs-api/sidebars.ts',
lastVersion: 'current',
versions: {
current: {
label: 'Next',
badge: false,
},
},
}],
['@docusaurus/plugin-client-redirects', {
redirects: [{ from: '/api', to: '/' }],
Expand Down Expand Up @@ -74,6 +81,7 @@ const config: Config = {
title: 'Execution APIs',
items: [
{ type: 'docSidebar', sidebarId: 'docsSidebar', docsPluginId: 'api', label: 'Docs', position: 'left' },
{ type: 'docsVersionDropdown', docsPluginId: 'api', position: 'right' },
{ href: 'https://github.com/ethereum/execution-apis', label: 'GitHub', position: 'right' },
],
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"serve": "docusaurus serve",
"clear": "docusaurus clear",
"watch": "nodemon --watch src --watch docs-api/docs --watch README.md --ignore docs-api/docs/quickstart.md --ext yaml,md,json --exec \"npm run build:spec && npm run docs:copy\"",
"docs:copy": "cp README.md ./docs-api/docs/quickstart.md"
"docs:copy": "cp README.md ./docs-api/docs/quickstart.md",
"docs:version": "docusaurus docs:version:api"
},
"repository": {
"type": "git",
Expand Down
Loading