From aaba11b7a217a1c871a09d5d6f78b44fd9c5489d Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sun, 21 Aug 2022 10:30:22 +0200 Subject: [PATCH] gha: build man pages --- .github/workflows/man-update.yaml | 26 ++++++++++++++++++++++++++ Makefile | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/man-update.yaml diff --git a/.github/workflows/man-update.yaml b/.github/workflows/man-update.yaml new file mode 100644 index 00000000..3ef5fc35 --- /dev/null +++ b/.github/workflows/man-update.yaml @@ -0,0 +1,26 @@ +name: Build man pages + +on: + workflow_dispatch: + push: + paths: + - docs/** + +jobs: + main: + name: Build man pages + runs-on: ubuntu-latest + steps: + - name: Install deps + run: sudo apt install pandoc + - name: Clone repository + uses: actions/checkout@v3 + # Not needed + # with: + # submodules: recursive + - name: Build man pages + run: make man + - uses: stefanzweifel/git-auto-commit-action@v4 + name: Commit + with: + commit_message: "[gha] build man pages" diff --git a/Makefile b/Makefile index 17163df4..f38ffc30 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,7 @@ man: --variable=date:"${DATE}" \ --variable=section:1 \ --from rst \ - --to man | gzip -c > /usr/share/man/man1/Hyprland.1.gz + --to man > ./docs/Hyprland.1 pandoc ./docs/hyprctl.1.rst \ --standalone \ @@ -175,4 +175,4 @@ man: --variable=date:"${DATE}" \ --variable=section:1 \ --from rst \ - --to man | gzip -c > /usr/share/man/man1/hyprctl.1.gz + --to man > ./docs/hyprctl.1