forked from PMEAL/porespy
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.54 KB
/
gh-pages.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
59
60
61
62
name: Deploy Documentation
on:
workflow_dispatch:
push:
branches:
- dev
jobs:
deploy-docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache conda
uses: actions/cache@v2
env:
CACHE_NUMBER: 0 # increase value -> force reset cache
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements.txt') }}
- name: Set up conda/mamba
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
allow-softlinks: true
use-only-tar-bz2: true
show-channel-urls: false
auto-activate-base: true
channel-priority: strict
channels: conda-forge,defaults
python-version: 3.8
- name: Install dependencies (conda)
run: |
mamba install --file requirements/docs.txt
pip install -r requirements.txt
# Build the documentation
- name: Build the documentation
run: |
cd docs
make html
# Push the documentation's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
cname: porespy.org