Test docs action
name: Deploy Documentation
on:
- push:
- branches:
- - dev
+ [push]
jobs:
deploy-docs:
@@ -11,40 +9,31 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
- shell: bash -l {0}
+ shell: bash
steps:
- - uses: actions/checkout@v2
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python-version }}
-
- - name: Cache conda
+ - name: Cache pip
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('**/conda_requirements.txt') }}
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/pip_requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
- - name: Set up conda/mamba
- uses: conda-incubator/setup-miniconda@v2
+ - uses: actions/checkout@v2
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
with:
- mamba-version: "*"
- allow-softlinks: true
- use-only-tar-bz2: true
- show-channel-urls: false
- auto-activate-base: true
- channel-priority: flexible
- channels: conda-forge,defaults
- condarc-file: requirements/.condarc
python-version: 3.8
- - name: Install dependencies (conda)
+ - name: Install dependencies (pip)
run: |
- mamba install --file requirements/doc_requirements.txt
- pip install -r requirements/pip_requirements.txt
+ pip install \
+ -r requirements/pip_requirements.txt \
+ -r requirements/test_requirements.txt
+ # Install porespy from the checked-out branch
+ pip install -e . --no-deps
# Build the documentation
- name: Build the documentation
@@ -52,6 +41,7 @@ jobs:
cd docs
python examples_linker.py
make html
+
# Push the documentation's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3
