Skip to content

Commit

Permalink
CI: Build docs with GitHub Actions (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 authored Nov 18, 2020
1 parent 04898fe commit e70c93e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 63 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Docs

on:
push:
branches: [ master ]
release:
types: [ created ]

jobs:
docs:
name: Publish Docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
activate-conda: false
python-version: 3.8
conda-channels: conda-forge

- name: Install and Build
shell: bash
run: |
conda create -n docs python=3.8 rasterio xarray scipy pyproj pandoc
source activate docs
python -m pip install -e .[doc]
sphinx-build -b html docs/ docs/_build/
- name: Deploy 🚀
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'release' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/_build/
CLEAN: false
TARGET_FOLDER: ${{ github.ref }}

- name: Deploy 🚀
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/_build/
CLEAN: false
TARGET_FOLDER: latest
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion github_deploy_key_corteva_rioxarray.enc

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ def get_version():
requirements = ["rasterio", "scipy", "xarray", "pyproj>=2.2"]

test_requirements = ["pytest>=3.6", "pytest-cov", "mock", "dask"]
doc_requirements = ["sphinx-click==1.1.0", "nbsphinx", "sphinx_rtd_theme"]

extras_require = {
"doc": doc_requirements,
"dev": test_requirements
+ doc_requirements
+ [
"sphinx-click==1.1.0",
"nbsphinx",
"sphinx_rtd_theme",
"black",
"flake8",
"pylint",
"isort",
"pre-commit",
]
],
}
extras_require["all"] = list(chain.from_iterable(extras_require.values()))

Expand Down

0 comments on commit e70c93e

Please sign in to comment.