ci: add manpage workflow

Christian Muehlhaeuser created

Change summary

.github/workflows/manpage.yml | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Detailed changes

.github/workflows/manpage.yml 🔗

@@ -0,0 +1,41 @@
+name: manpage
+
+on:
+  push:
+    branches:
+      - manpage
+
+jobs:
+  manpage:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.17
+
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Download Go modules
+        run: go mod download
+
+      - name: Build
+        run: |
+          cd cmd/soft
+          go build -v -tags mango
+
+      - name: Generate man-page
+        run: |
+          ./cmd/soft/soft > ./cmd/soft/soft.1
+
+      - name: Commit
+        uses: stefanzweifel/git-auto-commit-action@v4
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          commit_message: "docs: update man page"
+          branch: manpage
+          commit_user_name: mango 🤖
+          commit_user_email: actions@github.com
+          commit_author: mango 🤖 <actions@github.com>