forked from TheAlgorithms/Go
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 968 Bytes
/
godocmd.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
name: Generate Documentation
on:
push:
branches:
- master
jobs:
generate_readme:
name: Markdown Generation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '^1.18'
- name: Install GoDocMD
run: |
go install github.com/tjgurwara99/[email protected]
- name: Configure Github Action
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
- name: Update README.md file
run: |
godocmd -r -module ./ -w
- name: Commit changes if README.md is different
run: |
if [[ `git status --porcelain` ]]; then
git commit -am "Updated Documentation in README.md"
git push
else
echo "NO CHANGES DETECTED"
fi