Skip to content
Merged
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
40 changes: 33 additions & 7 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ This workflow automatically synchronizes documentation from the `genlayerlabs/ge
2. Gets the latest tag from the repository to use in the branch name
3. Copies new or updated files:
- Changelog files → `content/validators/changelog/`
- Config file → `content/validators/config.yaml` (sanitized - see note below)
- API gen method docs → `pages/api-references/genlayer-node/gen/`
- API debug method docs → `pages/api-references/genlayer-node/debug/`
- **Note**: Both `.md` and `.mdx` files are supported. `.md` files are automatically renamed to `.mdx` when copied
- **Config Sanitization**: The config file is sanitized during sync:
- ZKSync URLs are replaced with TODO placeholders
- `node.dev` and `node.admin` sections are removed
- **Regex Filtering**: API files can be filtered using regex patterns (see Customizing section below)
4. Runs documentation generation scripts:
- `generate-changelog.js`
- `update-setup-guide-versions.js`
- `update-config-in-setup-guide.js`
- `generate-api-docs.js`
5. Creates a PR with all changes, using the tag in the branch name (e.g., `sync-node-docs-v0.3.5`)

Expand All @@ -39,8 +45,10 @@ Add this to a workflow in the genlayer-node repository:
{
"source_branch": "${{ github.ref_name }}",
"changelog_path": "docs/changelog",
"api_gen_path": "docs/api/gen",
"api_debug_path": "docs/api/debug"
"api_gen_path": "docs/api/rpc/gen",
"api_debug_path": "docs/api/rpc/debug",
"api_gen_regex": "gen_(?!dbg_).*",
"api_debug_regex": "gen_dbg_.*"
}
```

Expand Down Expand Up @@ -70,8 +78,13 @@ Add this to a workflow in the genlayer-node repository:
From the Actions tab:
1. Select "Sync Documentation from Node Repository"
2. Click "Run workflow"
3. Optionally specify:
- Source branch (default: main)
3. Specify parameters:
- Tag for branch naming (required, e.g., v0.3.5)
- Source branch (optional, default: main)
- API gen path (optional, default: `docs/api/rpc/gen`)
- API debug path (optional, default: `docs/api/rpc/debug`)
- API gen regex filter (optional, default: `gen_(?!dbg_).*`)
- API debug regex filter (optional, default: `gen_dbg_.*`)

### File Structure Expected in genlayer-node

Expand All @@ -90,11 +103,24 @@ docs/
│ ├── gen_dbg_ping.md # Will be copied as gen_dbg_ping.mdx
│ ├── gen_dbg_trie.mdx # Will be copied as-is
│ └── ...
configs/
└── node/
└── config.yaml.example # Will be copied to content/validators/config.yaml
```

### Customizing Paths
### Customizing Paths and Filtering

The source paths can be customized in the event payload:
The source paths and filters can be customized in the event payload:

#### Paths
- `changelog_path`: Path to changelog files (default: `docs/changelog`)
- `api_gen_path`: Path to API gen methods (default: `docs/api/rpc/gen`)
- `api_debug_path`: Path to API debug methods (default: `docs/api/rpc/debug`)
- `api_debug_path`: Path to API debug methods (default: `docs/api/rpc/debug`)

#### Regex Filters
- `api_gen_regex`: Regex pattern to filter gen API files (default: `gen_(?!dbg_).*`)
- This default pattern matches files starting with `gen_` but excludes those starting with `gen_dbg_`
- `api_debug_regex`: Regex pattern to filter debug API files (default: `gen_dbg_.*`)
- This default pattern matches only files starting with `gen_dbg_`

The regex patterns are applied to the filename (without extension) to determine which files should be synced.
6 changes: 4 additions & 2 deletions .github/workflows/example-trigger-from-node.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ jobs:
"source_branch": "${{ github.ref_name }}",
"tag": "${{ steps.get_tag.outputs.tag }}",
"changelog_path": "docs/changelog",
"api_gen_path": "docs/api/gen",
"api_debug_path": "docs/api/debug"
"api_gen_path": "docs/api/rpc/gen",
"api_debug_path": "docs/api/rpc/debug",
"api_gen_regex": "gen_(?!dbg_).*",
"api_debug_regex": "gen_dbg_.*"
}

- name: Summary
Expand Down
Loading