-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.17 KB
/
generate-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Generate Documentation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
generate_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Docsible
run: |
pip install git+https://github.com/docsible/docsible.git@name-prefix-in-ansible-lint
- name: Generate documentation for role
run: |
docsible -r ./ -g -o README.md -a -com
- name: Check for documentation changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
if git diff --exit-code; then
echo "No changes to commit";
exit 0;
fi
- name: Commit and push documentation
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git commit -m "Automated documentation update by GitHub Actions"
git push "https://[email protected]/docsible/thermo-core.git" HEAD:main