File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed
Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 5959 name : JSON-Schema-documentation
6060 path : docgen/json/docs
6161 if-no-files-found : error
62+ docs_proto :
63+ runs-on : ubuntu-latest
64+ defaults :
65+ run :
66+ working-directory : docgen/proto
67+ steps :
68+ - name : Checkout
69+ # see https://github.com/actions/checkout
70+ uses : actions/checkout@v4
71+ - name : Generate Schema documentation
72+ run : ./gen.sh
73+ - name : Archive Schema documentation
74+ # https://github.com/actions/upload-artifact
75+ uses : actions/upload-artifact@v4
76+ with :
77+ name : PROTO-Schema-documentation
78+ path : docgen/proto/docs
79+ if-no-files-found : error
Original file line number Diff line number Diff line change 1+ /docs /
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eu
3+
4+ THIS_PATH=" $( realpath " $( dirname " $0 " ) " ) "
5+ SCHEMA_PATH=" $( realpath " $THIS_PATH /../../schema" ) "
6+ DOCS_PATH=" $THIS_PATH /docs"
7+ TEMPLATES_PATH=" $THIS_PATH /templates"
8+
9+ PROTOC_GEN_DOC_VERSION=' 1.5.1'
10+
11+ # --
12+
13+ rm -f -R " $DOCS_PATH "
14+ mkdir -p " $DOCS_PATH /" {1.3,1.4,1.5,1.6}
15+
16+ generate () {
17+ version=" $1 "
18+
19+ # # docs: https://github.com/pseudomuto/protoc-gen-doc
20+ docker run --rm \
21+ -v " ${DOCS_PATH} /${version} :/out" \
22+ -v " ${SCHEMA_PATH} :/protos:ro" \
23+ -v " ${TEMPLATES_PATH} :/templates:ro" \
24+ " pseudomuto/protoc-gen-doc:${PROTOC_GEN_DOC_VERSION} " \
25+ --doc_opt=html,index.html \
26+ " bom-${version} .proto"
27+
28+ # fix file permissions
29+ docker run --rm \
30+ -v " ${DOCS_PATH} /${version} :/out" \
31+ --entrypoint chown \
32+ " pseudomuto/protoc-gen-doc:${PROTOC_GEN_DOC_VERSION} " \
33+ " $( id -g) :$( id -u) " -R /out
34+ }
35+
36+ generate 1.3
37+ generate 1.4
38+ generate 1.5
39+ generate 1.6
You can’t perform that action at this time.
0 commit comments