Skip to content

Commit

Permalink
Add docs-dependencies target to makefile (#4719)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Jan 13, 2025
1 parent e51df2d commit 0c68311
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .woodpecker/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ steps:
build-cli:
image: *golang_image
commands:
- make docs
- make generate-docs
when:
- path: *when_path
event: [tag, pull_request, push]
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,17 @@ spellcheck:
pnpx cspell lint --no-progress stdin

##@ Docs
.PHONY: docs
docs: ## Generate docs (currently only for the cli)
.PHONY: docs-dependencies
docs-dependencies: ## Install docs dependencies
(cd docs/; pnpm install --frozen-lockfile)

.PHONY: generate-docs
generate-docs: ## Generate docs (currently only for the cli)
CGO_ENABLED=0 go generate cmd/cli/app.go
CGO_ENABLED=0 go generate cmd/server/openapi.go

.PHONY: build-docs
build-docs: generate-docs docs-dependencies ## Build the docs
(cd docs/; pnpm build)

endif
2 changes: 1 addition & 1 deletion docs/docs/92-development/09-openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ make generate-openapi
```

```bash title="update the Markdown in the ./docs folder"
make docs
make generate-docs
```
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "cd ../ && make docs && cd docs && docusaurus start",
"start": "cd ../ && make generate-docs && cd docs && docusaurus start",
"build": "pnpm build:woodpecker-plugins && docusaurus build",
"build:woodpecker-plugins": "cd plugins/woodpecker-plugins && pnpm i && pnpm build",
"swizzle": "docusaurus swizzle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ make generate-swagger
##### update the Markdown in the ./docs folder

```shell
make docs
make generate-docs
```

##### auto-format swagger related godoc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ make generate-swagger
```

```bash title="update the Markdown in the ./docs folder"
make docs
make generate-docs
```

```bash title="auto-format swagger related godoc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ make generate-swagger
```

```bash title="update the Markdown in the ./docs folder"
make docs
make generate-docs
```

```bash title="auto-format swagger related godoc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ make generate-swagger
```

```bash title="update the Markdown in the ./docs folder"
make docs
make generate-docs
```

```bash title="auto-format swagger related godoc"
Expand Down

0 comments on commit 0c68311

Please sign in to comment.