docs: auto-update evcc CLI reference on release (#31846)

This commit is contained in:
Michael Geers 2026-07-16 17:10:43 +02:00 • committed by GitHub
parent 09b0d9cb25
commit bd200460f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 89 additions and 25 deletions

45
.github/workflows/cli-docs.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Deploy CLI docs
on:
release:
types: [created]
workflow_dispatch:
inputs:
target_branch:
description: Target branch in the docs repository
default: main
jobs:
clidocs:
name: Deploy CLI docs
runs-on: depot-ubuntu-24.04-arm
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Generate CLI docs
run: go run main.go gendoc ./cli-docs
- name: Format
run: npx prettier@3 --write "./cli-docs/**/*.md"
- name: Deploy CLI docs to docs repo
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
personal_token: ${{ secrets.DOCS_DEPLOY_TOKEN }}
publish_dir: ./cli-docs
external_repository: evcc-io/docs
publish_branch: ${{ github.event.inputs.target_branch || 'main' }}
destination_dir: src/content/docs/en/reference/cli
allow_empty_commit: false
commit_message: CLI docs update
if: success()