-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (43 loc) · 1.16 KB
/
main.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
name: Starling
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Poetry
with:
virtualenvs-create: true
virtualenvs-in-project: true
uses: snok/install-poetry@v1
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'
- name: Install project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with docs,dev --no-interaction
- uses: isort/isort-action@v1
- name: Black
run: |
poetry run black --check --verbose ./starling
- name: Pytest
run: |
poetry run pytest
- name: Build documentation
run: |
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/source
poetry run sphinx-build -b html . ../build
cp -r ../build/* ../../gh-pages/
- name: Deploy documentation
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: gh-pages