forked from kornia/kornia
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.51 KB
/
docs.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
53
54
55
56
57
58
name: Documentation
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 4 * * *"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Setup conda dependencies
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.11
- name: Install dependencies
shell: bash -l {0}
run: |
conda install curl -c conda-forge
conda install pytorch cpuonly -c pytorch
pip install .[dev,x]
- name: Run doctest
shell: bash -l {0}
run: make doctest
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup conda dependencies
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.11
- name: Install dependencies
shell: bash -l {0}
run: |
pip install .[docs]
- name: Build Documentation
shell: bash -l {0}
run: make build-docs SPHINXOPTS="-W"
- name: Deploy to GitHub Pages
if: ${{ github.event_name != 'pull_request' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh_pages # The branch the action should deploy to.
FOLDER: docs/build/html # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch