manual update #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build documentation | |
name: Build and upload documentation | |
defaults: | |
run: | |
shell: bash | |
on: # Runs on any push event to master | |
push: | |
branches: | |
- 'master' | |
jobs: | |
documentation: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: # only lowest supported python on ubuntu-latest | |
os: [ubuntu-latest] | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get full Python version | |
id: full-python-version | |
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2.1.0 | |
with: | |
poetry-version: 1.1.4 | |
- name: Configure Poetry | |
run: | | |
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV | |
poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Ensure cache is healthy | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: pip --version >/dev/null 2>&1 || rm -rf .venv | |
- name: Upgrade pip, setuptools and wheel | |
run: poetry run python -m pip install --upgrade pip setuptools wheel | |
- name: Install dependencies | |
run: poetry install -v -E docs -E dataframe | |
- name: Build documentation | |
run: poetry run portray as_html -o doc_build | |
- name: Upload documentation to gh-pages | |
if: ${{ success() }} | |
uses: JamesIves/github-pages-deploy-action@3.7.1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: doc_build |