-
Notifications
You must be signed in to change notification settings - Fork 130
51 lines (48 loc) · 1.57 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
name: Generate Documentation
on:
push:
paths-ignore:
- "cmake/**"
pull_request:
paths:
- "docs/sphinx/**"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Bump Version Number
shell: bash
if: github.event_name == 'push'
run: |
VERTEST="\#define\sLIBOBS_API_\w+_VER\s([0-9]{1,2})"
VER=""
MAJOR=""
while IFS= read -r l
do
if [[ $l =~ $VERTEST ]]; then
if [[ $VER = '' ]]; then MAJOR="${BASH_REMATCH[1]}"; else VER+="."; fi
VER+="${BASH_REMATCH[1]}"
fi
done < "libobs/obs-config.h"
SVER="version = '([0-9\.]+)'"
RVER="version = '$VER'"
SREL="release = '([0-9\.]+)'"
RREL="release = '$VER'"
SCOPY="copyright = '([A-Za-z0-9, ]+)'"
RCOPY="copyright = '2017-$(date +"%Y"), Hugh Bailey'"
sed -i -E -e "s/${SVER}/${RVER}/g" -e "s/${SREL}/${RREL}/g" -e "s/${SCOPY}/${RCOPY}/g" docs/sphinx/conf.py
- uses: ./.github/actions/sphinx-publish-action-1.2.0
with:
sphinx_src: 'docs/sphinx'
build_only: True
target_branch: 'master'
target_path: '../home/_build'
pre_build_commands: 'pip install -Iv sphinx==5.1.1'
- uses: actions/upload-artifact@v3
with:
name: OBS Studio Documentation (HTML)
path: |
${{ runner.temp }}/_github_home/_build
!${{ runner.temp }}/_github_home/_build/.doctrees