Skip to content

Commit 7023f7d

Browse files
committed
improve creation of cli-flags documentation
1 parent 47a851c commit 7023f7d

6 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/actions/build-cli-flags-doc/action.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ name: "Build Mokapi CLI Flags doc"
22
runs:
33
using: composite
44
steps:
5-
- name: Create directory and file
5+
- name: Create dist directory and file
66
shell: bash
77
run: |
88
mkdir -p webui/dist
99
touch webui/dist/.tmp
1010
- name: Build CLI doc
1111
shell: bash
12-
run: go run ./cmd/internal/gen-cli-docs/main.go
13-
- name: Add CLI Flags nav entry
14-
working-directory: ./docs
15-
shell: bash
16-
run: |
17-
jq '.Configuration.items.Static.items["CLI Flags"] = "configuration/static/mokapi.md"' ./config.json > ./tmp.json
18-
mv ./tmp.json ./config.json
12+
run: go run ./cmd/internal/gen-cli-docs/main.go

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
- uses: actions/setup-go@v5
1818
with:
1919
go-version: 1.25.5
20-
- uses: ./.github/actions/build-cli-flags-doc
2120
- uses: ./.github/actions/build-release-notes
2221
- uses: actions/setup-node@v4
2322
with:

Taskfile.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ tasks:
2828
GOOS: darwin
2929
GOARCH: arm64
3030
build-vue-app:
31+
deps: [ensure-dist-folder]
3132
dir: webui
3233
cmds:
3334
- npm run clean
3435
- npm run copy-docs
36+
- go run ../cmd/internal/gen-cli-docs/main.go --output-dir ./webui/src/assets/docs/configuration/static
3537
- npm version {{.VERSION}}
3638
- npm run build-dashboard
3739
build-npm-package:
@@ -64,5 +66,9 @@ tasks:
6466
env:
6567
GOOS: darwin
6668
GOARCH: arm64
69+
ensure-dist-folder:
70+
cmds:
71+
- mkdir -p webui/dist
72+
- touch webui/dist/.tmp
6773

6874

docs/config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@
140140
"label": "CLI Usage",
141141
"source": "configuration/static/cli.md",
142142
"path": "/docs/configuration/static/cli-usage"
143+
},
144+
{
145+
"label": "CLI Flags",
146+
"source": "configuration/static/mokapi.md",
147+
"path": "/docs/configuration/static/cli-flags"
143148
}
144149
]
145150
},
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Release Notes
2+
3+
> ⚠️ This file is automatically generated during the release pipeline.

webui/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
"@rushstack/eslint-patch": "^1.15.0",
5353
"@types/js-yaml": "^4.0.9",
5454
"@types/markdown-it-container": "^4.0.0",
55-
"@types/node": "^25.1.0",
56-
"@vitejs/plugin-vue": "^6.0.3",
5755
"@types/node": "^25.2.1",
5856
"@vitejs/plugin-vue": "^6.0.4",
5957
"@vue/eslint-config-prettier": "^10.2.0",

0 commit comments

Comments
 (0)