-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added magefile to generate docs with github workflow #456
base: main
Are you sure you want to change the base?
Conversation
magefiles/magefile.go
Outdated
) | ||
|
||
// Generate markdown files for zed. | ||
func GenerateDocs() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also be great to add to SpiceDB as a followup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
func Run() { | ||
zl := cobrazerolog.New(cobrazerolog.WithPreRunLevel(zerolog.DebugLevel)) | ||
|
||
func InitialiseRootCmd(zl *cobrazerolog.Builder) *cobra.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Signed-off-by: Kartikay <[email protected]>
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. |
Signed-off-by: Kartikay <[email protected]>
@jzelinskie |
Signed-off-by: Kartikay <[email protected]>
206d06f
to
8a20dd1
Compare
Looks great to me! |
Fixes #234
Added github workflow that would invoke mage to generate docs for zed and submit the changes to the docs repo.