-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (43 loc) · 1.44 KB
/
publish.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
name: "Build and deploy docs pages"
on:
push:
branches:
- doc-rest-migration
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
persist-credentials: false
- name: "Setup python for sphinx"
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: "Install python dependencies"
run: |
pip3 install setuptools six
pip3 install sphinx sphinx-rtd-theme
pip3 install guzzle_sphinx_theme
pip3 install sphinx-fortran
# pip3 install sphinx-mathjax-offline
- name: "Build sphinx doc"
run: |
cd CGNS-ReST-site
chmod +x build.sh
./build.sh
shell: bash
- name: "Deploy"
run: |
cd CGNS-ReST-site
git clone -b gh-pages --single-branch https://github.com/CGNS/cgns-modern.github.io.git docs/_build/deploy
rsync -q -av --checksum --progress docs/_build/html/ docs/_build/deploy
cd docs/_build/deploy
git config --global user.name 'autopages'
git config --global user.email '[email protected]'
git add --all .
git commit -m "Update gh-pages"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git push
shell: bash