-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (48 loc) · 1.36 KB
/
docs_pages.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
name: docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_docs_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/docs/buildDocs.sh') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-mpi4py python3-numpy
sudo apt-get install -y libhdf5-openmpi-dev
- name: Install python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel numpy mpi4py "cython<3"
python3 -m pip install "pmesh @ git+https://github.com/rainwoodman/pmesh"
python3 -m pip install -r requirements.txt
- name: Install package
run: |
python3 -m pip install .
- name: Build docs
shell: bash
run: |
docs/buildDocs.sh
- name: Publish docs to gh-pages
if: github.event_name == 'push'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docs/publishDocs.sh