ci: docs: make sure they are built for releases and manually
[awesomized/libmemcached] / .github / workflows / docs-publish-pages.yml
index ce82af53b3236fdaa4a2947c15365d927f671c1c..cd5c66eb21b68814e616de5b8bc1382afe4fe939 100644 (file)
@@ -1,12 +1,19 @@
 name: docs-publish-pages
 
 on:
+  workflow_dispatch:
+  release:
+    types: [published]
   push:
     paths:
       - 'docs/**'
+      - 'ChangeLog*'
     branches:
       - v1.x
 
+env:
+  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
 jobs:
   publish:
     runs-on: ubuntu-20.04
@@ -15,11 +22,12 @@ jobs:
       - name: Install dependencies
         run: |
           sudo apt-get install -y \
+            python3-m2r \
             python3-sphinx \
             python3-sphinx-rtd-theme
       - name: Configure
         run: |
-          cmake -DBUILD_DOCSONLY=ON -DBUILD_DOCS_MAN=OFF -S . -B build
+          cmake -DBUILD_DOCSONLY=ON -DBUILD_DOCS_HTML=ON -DBUILD_DOCS_MAN=OFF -S . -B build
       - name: Build
         run: |
           make -C build html
@@ -30,9 +38,3 @@ jobs:
           keep_history: true
           allow_empty_commit: false
           build_dir: build/docs/html
-          commit_message: |
-            ${{ github.event.push.pusher }} pushed to following commits:\
-            \
-            ${{ join(github.event.push.commits.*.message, '\n\n') }}\
-            \
-            ${{ github.event.push.compare }}