-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.24 KB
/
docs_preview.yaml
File metadata and controls
48 lines (41 loc) · 1.24 KB
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
name: docs preview
on:
push:
branches: [ docs ]
jobs:
build-and-deploy:
name: build and deploy docs preview
runs-on: ubuntu-latest
env:
MPLBACKEND: 'Agg'
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install OQ and dependencies
run: |
sudo apt-get install -y libspatialindex-dev
git clone --depth=1 https://github.com/gem/oq-engine.git
cd oq-engine
python ./install.py devel
cd ..
source $HOME/openquake/bin/activate
pip install h3
pip install -r requirements.txt
pip install -e .
pip install sphinx furo recommonmark
- name: Build HTML docs
run: |
source $HOME/openquake/bin/activate
sphinx-build -b html doc_src/source doc_src/build/html
touch doc_src/build/html/.nojekyll
- name: Deploy preview to gh-pages/preview/docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: doc_src/build/html/
destination_dir: preview/docs
commit_message: "docs preview from docs branch"