-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (64 loc) · 2.24 KB
/
gen-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
name: Generate Docs
on:
# File paths to consider in the event. Optional; defaults to all
push:
branches: # Array of patterns that match refs/heads
- master # Push events on master branch
# - test-dev
# - 'releases/*' # Push events to branches matching refs/heads/releases/*
# - '!refs/pull/*'
# tags: # Array of patterns that match refs/tags.
# - v1 # Push events to v1 tag
paths: # Push events containing matching files
# - 'source/*'
- '.github/workflows/gen-docs.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "[email protected]:"' >> ~/.gitconfig
- uses: actions/checkout@v2
with:
# submodules: true
persist-credentials: false
token: ${{ secrets.PAT }}
- name: Setup git user
env:
ACCESS_TOKEN: ${{ secrets.PAT }}
run: |
if [ -z "$COMMIT_EMAIL" ]
then
COMMIT_EMAIL="${GITHUB_ACTOR}@users.noreply.github.com"
fi
if [ -z "$COMMIT_NAME" ]
then
COMMIT_NAME="${GITHUB_ACTOR}"
fi
git config --global credential.helper store && \
git config --global user.email "${COMMIT_EMAIL}" && \
git config --global user.name "${COMMIT_NAME}" && \
REPOSITORY_PATH="https://${ACCESS_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: install and build
run: |
python3 -m pip install --upgrade Sphinx recommonmark guzzle_sphinx_theme sphinx_rtd_theme nbsphinx;
make clean;
make html;
touch build/html/.nojekyll
ls -lrt build/html
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
FOLDER: build/html
BRANCH: gh-pages
# BUILD_SCRIPT: |
# apt-get install -y graphviz doxygen-gui rsync python3-pip;
# python3 -m pip install --upgrade Sphinx recommonmark guzzle_sphinx_theme sphinx_rtd_theme;
# make html;
# touch build/html/.nojekyll
# ls -lrt build/html
GITHUB_TOKEN: ${{ secrets.PAT }}