forked from SpamapS/gearmand
-
Notifications
You must be signed in to change notification settings - Fork 138
97 lines (77 loc) · 2.11 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build and Deploy Docs
on:
# Run on pushes targeting the default branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between any
# in-progress and latest queued runs. However, do not cancel in-progress runs
# as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
if: github.repository_owner == 'gearman'
name: Build Docs
runs-on: ubuntu-20.04
steps:
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y \
apt-transport-https \
apt-file \
software-properties-common \
build-essential \
autotools-dev \
autoconf \
automake \
make \
pkgconf \
libboost-all-dev \
libevent-dev \
gperf \
uuid-dev \
sphinx-doc \
sphinx-common \
python3-sphinx
- name: Clone Repository
uses: actions/checkout@v4
- name: Bootstrap
run: |
if [ -f "/etc/lsb-release" ]; then
cat /etc/lsb-release
fi
./bootstrap.sh -a
shell: bash
- name: Configure
run: |
./configure
shell: bash
- name: Build HTML Documentation
run: make -C docs dirhtml
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/build/dirhtml'
deploy:
if: github.repository_owner == 'gearman'
name: Deploy Docs
# Add a dependency on the build job
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4