Skip to content

Commit

Permalink
Move docs build from the default branch to a orphan branch, and workf…
Browse files Browse the repository at this point in the history
…low to build on push to master (#32)

* move docs build out of default branch, testing docs build in workflow

* fix env

* GH Pages docs deploy workflow
  • Loading branch information
wsdewitt authored Mar 13, 2022
1 parent 6d85740 commit 4d2ad77
Show file tree
Hide file tree
Showing 117 changed files with 183 additions and 26,116 deletions.
63 changes: 33 additions & 30 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,36 @@ jobs:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- 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 setuptools wheel
pip install flake8 pytest black
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev
# - name: Install macOS dependencies
# if: matrix.os == 'macos-latest'
# run: conda install -c anaconda libcurl
- name: Install mutyper
run: |
pip install .
- name: Lint
run: |
make lint
- name: Check format with black
run: |
black --check mutyper
- name: Test
run: |
make test
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install Pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Install miniconda and create environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mutyper
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
auto-update-conda: true

- name: Lint
# NOTE: must specify the shell so that conda init updates bashrc see:
# https://github.com/conda-incubator/setup-miniconda#IMPORTANT
shell: bash -l {0}
run: make lint

- name: Check format with black
shell: bash -l {0}
run: black --check mutyper

- name: Test
shell: bash -l {0}
run: make test

- name: Test docs build
shell: bash -l {0}
run: |
make docs
37 changes: 37 additions & 0 deletions .github/workflows/docs-build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Docs build and deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Install Pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Install miniconda and activate environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mutyper
environment-file: environment.yml
python-version: 3.9
auto-activate-base: false
auto-update-conda: true

- name: Build 🔧
# NOTE: must specify the shell so that conda init updates bashrc see:
# https://github.com/conda-incubator/setup-miniconda#IMPORTANT
shell: bash -l {0}
run: |
make docs
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: docs # The branch the action should deploy to.
folder: docs/_build/html # The folder the action should deploy.
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default:

# install:
# pip install -r requirements.txt
# pip install -e .
install:
pip install -r requirements.txt
pip install -e .

test:
pytest
Expand All @@ -18,9 +18,6 @@ lint:
flake8 . --count --max-complexity=30 --max-line-length=127 --statistics

docs:
make -C docsrc html

deploy:
make -C docsrc github
make -C docs html

.PHONY: install test format lint docs deploy
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](docsrc/_static/logo.png)
![](docs/_static/logo.png)

A Python package and command line utility for annotating the local ancestral sequence context of biallelic SNPs

Expand Down
4 changes: 0 additions & 4 deletions docs/.buildinfo

This file was deleted.

Empty file removed docs/.nojekyll
Empty file.
Loading

0 comments on commit 4d2ad77

Please sign in to comment.