-
Notifications
You must be signed in to change notification settings - Fork 1.2k
40 lines (39 loc) · 1.25 KB
/
doc-gen-job.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
name: doc-gen-job
on:
workflow_dispatch:
pull_request:
jobs:
doc-gen-job:
runs-on: 8-core
container:
image : ghcr.io/facebookincubator/velox-dev:circleci-avx
env:
CC: /opt/rh/gcc-toolset-9/root/bin/gcc
CXX: /opt/rh/gcc-toolset-9/root/bin/g++
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: recursive
- name: Build docs and update gh-pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "velox"
git config --global --add safe.directory $GITHUB_WORKSPACE
git fetch origin
git checkout origin/main
conda init bash
source ~/.bashrc
conda create -y --name docgenenv python=3.7
conda activate docgenenv
pip install sphinx sphinx-tabs breathe sphinx_rtd_theme chardet
source /opt/rh/gcc-toolset-9/enable
./scripts/gen-docs.sh docgenenv
git checkout gh-pages
cp -R velox/docs/_build/html/* docs
git add docs
if [ -n "$(git status --porcelain --untracked-files=no)" ]
then
git commit -m "Update documentation"
git push
fi