Skip to content

Commit 396a2b8

Browse files
Merge pull request #3 from antoinedemathelin/master
ci: Add docs workflows
2 parents c501c9a + d863ea2 commit 396a2b8

File tree

376 files changed

+16700
-13250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+16700
-13250
lines changed

.github/workflows/check-docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Check docs"
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.8'
17+
- name: Install doc dependencies
18+
run: |
19+
sudo apt install pandoc
20+
python -m pip install --upgrade pip
21+
pip install sphinx numpydoc nbsphinx sphinx_gallery sphinx_rtd_theme
22+
- name: Install adapt dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
- name: Install adapt
27+
run: |
28+
pip install -e .
29+
- name: Build documentation
30+
run: |
31+
sudo rm -r -f docs/*
32+
make html
33+
sudo rm -r -f docs/doctrees
34+
mv -v docs/html/* docs/
35+
sudo rm -r -f docs/html
36+
touch .nojekyll
37+
- uses: actions/upload-artifact@v1
38+
with:
39+
name: DocumentationHTML
40+
path: docs/
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Publish docs online"
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.8'
16+
- name: Install doc dependencies
17+
run: |
18+
sudo apt install pandoc
19+
python -m pip install --upgrade pip
20+
pip install sphinx numpydoc nbsphinx sphinx_gallery sphinx_rtd_theme
21+
- name: Install adapt dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
- name: Install adapt
26+
run: |
27+
pip install -e .
28+
- name: Build documentation
29+
run: |
30+
sudo rm -r -f docs/*
31+
make html
32+
sudo rm -r -f docs/doctrees
33+
mv -v docs/html/* docs/
34+
sudo rm -r -f docs/html
35+
touch .nojekyll
36+
- name: Push changes to remote
37+
run: |
38+
git config --global user.name "github-actions[bot]"
39+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
git add docs
41+
git commit -m "Update docs"
42+
git push
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into "master"
14+
- uses: release-drafter/release-drafter@v5
15+
# with:
16+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
17+
# config-name: my-config.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Upload package to Pypi
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
overrideVersion:
7+
description: Manually force a version
8+
9+
env:
10+
CIBW_BUILD_VERBOSITY: 1
11+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }}
12+
13+
jobs:
14+
make_sdist:
15+
name: Make SDist
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Setup Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.8'
23+
- name: Install deps
24+
run: python -m pip install build twine
25+
- name: Build SDist
26+
run: python -m build --sdist
27+
- uses: actions/upload-artifact@v2
28+
with:
29+
path: dist/*.tar.gz
30+
- name: Check metadata
31+
run: twine check dist/*

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ __pycache__
44
# Distribution / packaging
55
.Python
66
env/
7-
build/
8-
source/
97
develop-eggs/
108
dist/
119
downloads/

Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = src_docs
9+
BUILDDIR = docs
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
23+
#html-noplot:
24+
# $(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
25+
# @echo
26+
# @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

docs/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.
44.3 KB
87.3 KB
62.1 KB

0 commit comments

Comments
 (0)