-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add mike install and initial config to mkdocs * Separate workflows by push, release, clean (not ideal - will fix later)
- Loading branch information
Showing
13 changed files
with
173 additions
and
113 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Clean Docs for Deleted References | ||
on: | ||
delete: | ||
|
||
env: | ||
PYTHON_VERSION: 3.8 | ||
|
||
jobs: | ||
clean: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python $PYTHON_VERSION | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: $PYTHON_VERSION | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install mike | ||
- name: Configure Git user | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
- name: Delete defunct docs versions | ||
run: | | ||
echo "Deleting ${{ github.event.ref_name }} version from docs" | ||
mike delete ${{ github.event.ref_name }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Push Workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Document branch | ||
run: echo ${{ github.ref_name }} | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
- name: Lint | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Install package | ||
run: | | ||
pip install -e .[test] | ||
- name: Test with pytest | ||
run: | | ||
pytest -s -m "not skipci" | ||
- name: Configure Git user | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
- name: Build docs | ||
run: | | ||
mike deploy --push --rebase ${{ github.ref_name }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Release Workflow | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-test-deploy: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
env: | ||
DEPLOY_TARGET: ${{ matrix.python-version == '3.8' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Document python/os version | ||
run: | | ||
echo "Python V ${{ matrix.python-version }}" | ||
echo "Targeted Deployment Combo? $DEPLOY_TARGET" | ||
- name: Document branch | ||
run: echo ${{ github.ref_name }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
- name: Lint | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Install package | ||
run: | | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
pytest -s -m "not skipci" | ||
- name: Configure Git user | ||
if: ${{DEPLOY_TARGET}} | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
- name: Build docs | ||
if: ${{DEPLOY_TARGET}} | ||
run: | | ||
mike deploy --push --rebase --update-aliases ${{ github.ref_name }} latest | ||
- name: Install deployment dependencies | ||
if: ${{DEPLOY_TARGET}} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Publish to PyPI | ||
if: ${{DEPLOY_TARGET}} | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Development | ||
|
||
|
||
## Preparation | ||
|
||
### Install Git | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### For testing feature | ||
|
||
I am the the PR for branch: `test-deleting-ref` --> `versioned-docs` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ theme: | |
plugins: | ||
- autorefs | ||
- awesome-pages | ||
- mike | ||
- mkdocstrings: | ||
default_handler: python | ||
enable_inventory: true | ||
|
@@ -57,6 +58,11 @@ plugins: | |
- tm2py | ||
- search | ||
|
||
extra: | ||
version: | ||
provider: mike | ||
default: latest | ||
|
||
extra_javascript: | ||
- https://unpkg.com/[email protected]/dist/mermaid.min.js | ||
|
||
|
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
Oops, something went wrong.