-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (41 loc) · 1.21 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
name: Docs
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-doc-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: airtrafficsim
channel-priority: strict
environment-file: environment.yml
python-version: 3.11
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Build HTML
run: |
sphinx-build -b html docs/source/ docs/build/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html