-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.36 KB
/
python-package-and-doc.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: Python package and documentation
on:
push:
pull_request:
branches:
- '**:**' # run only for PR from forked repos
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt', './requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v2
with:
path: ~/.local
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt', './requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . && foa3d -h
pip uninstall -y foa3d
pip install -r requirements-dev.txt
- name: Build wheel
run: pip install wheel && make
- name: sphinx
working-directory: ./doc
env:
PYTHONPATH: ..
run: make html
- name: GitHub Pages
uses: crazy-max/[email protected]
if: github.ref == 'refs/heads/main'
with:
build_dir: doc/_build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}