-
Notifications
You must be signed in to change notification settings - Fork 40
39 lines (39 loc) · 943 Bytes
/
website.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
on:
push:
branches:
- master
tags:
- v*
pull_request:
name: Build website
jobs:
test:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- name: pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- run: pip install tox
- run: tox
env:
TOXENV: docs
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v4
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/_build/html
base_branch: master
clean: true