Added magefile to generate docs with github workflow#456
Added magefile to generate docs with github workflow#456tstirrat15 merged 3 commits intoauthzed:mainfrom
Conversation
magefiles/magefile.go
Outdated
| ) | ||
|
|
||
| // Generate markdown files for zed. | ||
| func GenerateDocs() error { |
There was a problem hiding this comment.
Mind naming this gen:docs and adding a gen:all as well?
We use that form in SpiceDB for any generated code: https://github.com/authzed/spicedb/blob/main/magefiles/gen.go#L16
There was a problem hiding this comment.
This would also be great to add to SpiceDB as a followup
| func Run() { | ||
| zl := cobrazerolog.New(cobrazerolog.WithPreRunLevel(zerolog.DebugLevel)) | ||
|
|
||
| func InitialiseRootCmd(zl *cobrazerolog.Builder) *cobra.Command { |
There was a problem hiding this comment.
Add a doc comment on this exported method
6b469e5 to
b995d78
Compare
.github/workflows/docs.yaml
Outdated
| - name: "Generate documentation" | ||
| run: | | ||
| cd magefiles | ||
| if ! mage GenerateDocs; then |
3d5a21a to
b5e88da
Compare
|
@kartikaysaxena Mind opening a PR with the docs on the docs repo so I can see them as well? |
Here it is authzed/docs#296 |
|
Also authzed/spicedb#2208 and authzed/docs#298 for SpiceDB docs |
|
Another way of doing this is to use commands like |
|
I think this is wayyy too many files for our docs. Another route to accomplish this could be reusing our existing manpage and pandoc to generate markdown. |
|
@jzelinskie |
206d06f to
8a20dd1
Compare
|
Looks great to me! |
Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>
Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>
tstirrat15
left a comment
There was a problem hiding this comment.
Looks good to me! Let's get this in.
|
Thank you for putting this up! |
Fixes #234
Added github workflow that would invoke mage to generate docs for zed and submit the changes to the docs repo.