Skip to content

Commit

Permalink
docs: update readme with injection/version bump
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Rose <[email protected]>
  • Loading branch information
matty-rose committed Nov 14, 2021
1 parent ac28626 commit dd48887
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A program to generate documentation for GitHub [composite actions](https://docs.
Substitute `darwin` for `linux` if installing on MacOS.

```bash
export GHA_DOCS_VERSION=v0.12.0
export GHA_DOCS_VERSION=v0.13.0
export GHA_DOCS_OS=linux
export GHA_DOCS_ARCH=amd64

Expand All @@ -31,7 +31,7 @@ chmod +x gha-docs && mv gha-docs /usr/local/bin
Go `1.17+` is required.

```bash
go install github.com/matty-rose/gha-docs@v0.12.0
go install github.com/matty-rose/gha-docs@v0.13.0
```

## Usage
Expand All @@ -45,11 +45,22 @@ gha-docs generate path/to/action.yaml

### Generating a README

This will overwrite any existing content in `README.md`. Support for injecting the generated documentation between markers is coming soon!
This will overwrite any existing content in `README.md`.
```bash
gha-docs generate --output-file README.md path/to/action.yaml
```

To inject generated documentation into an existing file, adding the following markers in the file will cause the documentation to be generated between them, overwriting any content already existing between the markers, and preserving any content outside the markers.
```md
<!-- BEGIN GHA DOCS -->
<!-- END GHA DOCS -->
```

Then use the `-i/--inject` flag to inject the documentation into the file specified by `-o/--output-file` e.g.
```bash
gha-docs generate -i -o README.md path/to/action.yaml
```

## License

MIT License - Copyright (c) 2021

0 comments on commit dd48887

Please sign in to comment.