-
Notifications
You must be signed in to change notification settings - Fork 233
42 lines (35 loc) · 1.2 KB
/
docs_builder.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
# This action is triggered whenever push to the docs folder of the master branch is made.
# It generates HTML pages from the docs folder of the master branch and push them to the gh-pages branch.
name: Build user documentation pages
on:
push:
branches: 'master'
paths: 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Sphinx
run: pip install -U Sphinx
- name: Install Theme
run: pip install sphinx-rtd-theme
- name: Checkout master
uses: actions/checkout@master
with:
path: 'master'
- name: Checkout gh-pages
uses: actions/checkout@master
with:
path: 'gh_pages'
ref: 'gh-pages'
- name: Build user documentation
run: sphinx-build -b html "${GITHUB_WORKSPACE}/master/docs" "${GITHUB_WORKSPACE}/gh_pages/docs"
- name: Push changes in gh-pages
run: |
cd "${GITHUB_WORKSPACE}/gh_pages"
date > generated.txt
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "update user documentation bot"
git push