Add docs-dependencies target to makefile (#4719)

This commit is contained in:
Robert Kaussow 2025-01-13 13:11:32 +01:00 committed by GitHub
parent e51df2db5e
commit 0c683110f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 17 additions and 9 deletions

View File

@ -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]

View File

@ -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

View File

@ -55,5 +55,5 @@ make generate-openapi
```
```bash title="update the Markdown in the ./docs folder"
make docs
make generate-docs
```

View File

@ -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",

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"