-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.57 KB
/
manpages.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
46
47
48
49
50
51
52
53
54
55
56
57
---
name: Generate Manual
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Check changes, cancel job is not.
check_changes:
runs-on: ubuntu-latest
outputs:
smux_changed: ${{ steps.check_file_changed.outputs.smux_changed }}
steps:
- uses: actions/checkout@v2
with:
# Checkout as many commits as needed for the diff
fetch-depth: 2
# man page generated from README
- id: check_file_changed
run: |
if git diff --name-only HEAD^ HEAD README.md; then
echo "smux_changed=True" >> $GITHUB_OUTPUT
else
echo "smux_changed=False" >> $GITHUB_OUTPUT
fi
gen_man:
runs-on: ubuntu-latest
needs: check_changes
if: needs.check_changes.outputs.smux_changed == 'True'
steps:
- uses: actions/checkout@v2
# Fetch from compatibility table all the distros supported
- id: generate
run: |
sudo apt-get update
sudo apt-get install pandoc
./man/gen-man
- uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: Automatic Man Page Update
commit_options: '--no-verify --signoff'
commit_user_name: smux-docs-bot
commit_user_email: [email protected]
commit_author: smux-docs-bot <[email protected]>