workflows: docs-publish-pages [ci skip]
authorMichael Wallner <mike@php.net>
Wed, 14 Oct 2020 15:43:58 +0000 (17:43 +0200)
committerMichael Wallner <mike@php.net>
Wed, 14 Oct 2020 15:43:58 +0000 (17:43 +0200)
.github/workflows/cmake-build-ci.gen
.github/workflows/cmake-build-ci.yml
.github/workflows/docs-publish-pages.yml [new file with mode: 0644]

index b0d3c5a5ca610e4210a3dd839e2e7118dd72404b..dddde934da170f6466f5c2ad37c32d8f0f763bfa 100755 (executable)
@@ -192,6 +192,7 @@ on:
       - "docs/**"
       - ".travis.yml"
       - ".cirrus.yml"
+      - ".github/workflows/docs*"
     branches-ignore:
       - gh-pages
   pull_request:
index 0d5208b6f703f89a91dd5d4f4916762b149b4b81..3e9bf4af7cc53838f3b33c8ef60b89c8debafe96 100644 (file)
@@ -6,6 +6,7 @@ on:
       - "docs/**"
       - ".travis.yml"
       - ".cirrus.yml"
+      - ".github/workflows/docs*"
     branches-ignore:
       - gh-pages
   pull_request:
diff --git a/.github/workflows/docs-publish-pages.yml b/.github/workflows/docs-publish-pages.yml
new file mode 100644 (file)
index 0000000..ce82af5
--- /dev/null
@@ -0,0 +1,38 @@
+name: docs-publish-pages
+
+on:
+  push:
+    paths:
+      - 'docs/**'
+    branches:
+      - v1.x
+
+jobs:
+  publish:
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+      - name: Install dependencies
+        run: |
+          sudo apt-get install -y \
+            python3-sphinx \
+            python3-sphinx-rtd-theme
+      - name: Configure
+        run: |
+          cmake -DBUILD_DOCSONLY=ON -DBUILD_DOCS_MAN=OFF -S . -B build
+      - name: Build
+        run: |
+          make -C build html
+      - uses: crazy-max/ghaction-github-pages@v2
+        if: success()
+        with:
+          jekyll: false
+          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 }}