Skip to content

Commit 5dca926

Browse files
committed
Update documentation
1 parent 799277d commit 5dca926

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Rendering the documentation as part of the CI pipeline ensures always up-to-date
77

88
## 💻 Usage
99

10-
This Github action can be imported into your own workflow via `uses` property:
11-
`- uses: arduino/render-docs-github-action@main`
10+
This Github workflow can be imported into your own workflow via `uses` property:
11+
`arduino/render-docs-github-action/.github/workflows/render-docs.yml`
1212
The minimal arguments that it needs are `source-path` and `target-path`.
1313

1414
Here is a minimal workflow to render documentation in your own repository:
@@ -35,7 +35,20 @@ on:
3535

3636
jobs:
3737
render-docs:
38-
runs-on: ubuntu-latest
38+
permissions:
39+
contents: write
40+
uses: arduino/render-docs-github-action/.github/workflows/render-docs.yml@main
41+
with:
42+
source-path: './src'
43+
target-path: './docs/api.md'
44+
commit: ${{ github.event_name != 'pull_request' }} # Only commit changes if not a PR
45+
```
46+
47+
You can also run the tool as a Github action, rather than a reusable workflow:
48+
49+
```yaml
50+
jobs:
51+
render-docs:
3952
permissions:
4053
contents: write
4154

@@ -45,7 +58,6 @@ jobs:
4558
with:
4659
source-path: './src'
4760
target-path: './docs/api.md'
48-
commit: ${{ github.event_name != 'pull_request' }} # Only commit changes if not a PR
4961
```
5062
5163
Please note that this workflow only triggers when files are modified that match the given `paths:` pattern. This can be useful to avoid unnecessary workflow runs.

0 commit comments

Comments
 (0)