Skip to content

Commit

Permalink
Merge pull request #389 from jGaboardi/docs_action
Browse files Browse the repository at this point in the history
add docs action workflow
  • Loading branch information
jGaboardi authored Jun 27, 2021
2 parents 66905ad + d47143d commit 289c9ee
Show file tree
Hide file tree
Showing 473 changed files with 126 additions and 97,458 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

name: Build Docs
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
inputs:
version:
description: Manual Doc Build Reason
default: test
required: false

jobs:
docs:
name: Build & Push Docs
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix:
os: ['ubuntu-latest']
environment-file: [ci/38.yaml]
experimental: [false]
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: 'latest'

- name: Make Docs
run: cd docs; make html

- name: Commit Docs
run: |
git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
cp -r docs/_build/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present,
# so we ignore the return code.
- name: push to gh-pages
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
7 changes: 7 additions & 0 deletions ci/38.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ dependencies:
- xarray
- joblib
- zstd
# for docs build action (this env only)
- nbsphinx
- numpydoc
- sphinx>=1.4.3
- sphinxcontrib-bibtex<2.0.0
- sphinx_bootstrap_theme

7 changes: 5 additions & 2 deletions docsrc/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = PACKAGE_NAME
SPHINXPROJ = libpysal
SOURCEDIR = .
BUILDDIR = _build

Expand All @@ -17,15 +17,18 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@rsync -r --exclude '.ipynb_checkpoints/' ../notebooks/ ./notebooks/
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

github:
@make html

sync:
@rsync -avh --exclude '.nojekyll' _build/html/ ../docs/ --delete
@rsync -avh _build/html/ ../docs/ --delete
@make clean
touch .nojekyll

clean:
rm -rf $(BUILDDIR)/*
rm -rf auto_examples/
rm -rf generated/
Binary file not shown.
Binary file removed docs/_images/notebooks_Raster_awareness_API_29_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_Raster_awareness_API_33_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_Raster_awareness_API_37_2.png
Binary file not shown.
Binary file removed docs/_images/notebooks_Raster_awareness_API_39_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_Raster_awareness_API_6_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_examples_22_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_voronoi_10_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_voronoi_15_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_voronoi_16_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_voronoi_19_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_12_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_21_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_28_1.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_31_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_38_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_41_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_57_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_58_0.png
Binary file not shown.
Binary file removed docs/_images/notebooks_weights_7_0.png
Binary file not shown.
165 changes: 0 additions & 165 deletions docs/_modules/index.html

This file was deleted.

Loading

0 comments on commit 289c9ee

Please sign in to comment.