ci: docs: make sure they are built for releases and manually
[awesomized/libmemcached] / .github / workflows / docs-publish-pages.yml
1 name: docs-publish-pages
2
3 on:
4 workflow_dispatch:
5 release:
6 types: [published]
7 push:
8 paths:
9 - 'docs/**'
10 - 'ChangeLog*'
11 branches:
12 - v1.x
13
14 env:
15 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16
17 jobs:
18 publish:
19 runs-on: ubuntu-20.04
20 steps:
21 - uses: actions/checkout@v2
22 - name: Install dependencies
23 run: |
24 sudo apt-get install -y \
25 python3-m2r \
26 python3-sphinx \
27 python3-sphinx-rtd-theme
28 - name: Configure
29 run: |
30 cmake -DBUILD_DOCSONLY=ON -DBUILD_DOCS_HTML=ON -DBUILD_DOCS_MAN=OFF -S . -B build
31 - name: Build
32 run: |
33 make -C build html
34 - uses: crazy-max/ghaction-github-pages@v2
35 if: success()
36 with:
37 jekyll: false
38 keep_history: true
39 allow_empty_commit: false
40 build_dir: build/docs/html