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