-
Notifications
You must be signed in to change notification settings - Fork 98
44 lines (37 loc) · 1.22 KB
/
sphinx.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
name: Sphinx Pages
on:
push:
branches:
- main
jobs:
build:
name: Sphinx Pages
runs-on: ubuntu-latest
steps:
- name: "Checkout Main Branch"
uses: actions/checkout@v2
with:
persist-credentials: false
path: main
ref: main
- name: "Checkout GitHub Pages Branch"
uses: actions/checkout@v2
with:
persist-credentials: false
path: gh-pages
ref: gh-pages
- name: "Setup Python & Install Spinx"
uses: actions/setup-python@v3
- name: "Install Sphinx & Theme"
run: pip install sphinx==4.5.0 sphinx-rtd-theme==1.0.0
- name: "Run Sphinx"
run: sphinx-build -b html main/docs gh-pages -E -d $GITHUB_WORKSPACE/.doctree
- name: "Commit & Push Changes (If Any)"
run: |
cd gh-pages
git add -A
git config --global user.email "$(git show --format=%ae -s)"
git config --global user.name "$(git show --format=%an -s)"
git commit -m "From $GITHUB_REF $(echo ${GITHUB_SHA} | cut -c 1-8)"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push