Merge branch 'release/0.16.4' #62
This file contains hidden or 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
| name: Documentation | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| - name: Install & Build 📜 | |
| run: | | |
| # for spinx autosummary feature, we need to install genomepy | |
| # setup mambaforge | |
| wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" | |
| bash Miniforge3.sh -b -p "${HOME}/conda" > /dev/null | |
| source "${HOME}/conda/etc/profile.d/conda.sh" | |
| source "${HOME}/conda/etc/profile.d/mamba.sh" | |
| mamba activate | |
| # create a yaml with only docs requirements | |
| n="$(( $(grep -n '# Plugins' environment.yml | cut -d ':' -f1) - 1 ))" | |
| head environment.yml -n $n > requirements.yaml | |
| n="$(( $(wc -l docs/requirements.yaml | cut -d ' ' -f1) - $(grep -n 'dependencies:' environment.yml | cut -d ':' -f1) + 1 ))" | |
| tail docs/requirements.yaml -n $n >> requirements.yaml | |
| # install requirements | |
| mamba env create --name genomepy --file requirements.yaml | |
| # install genomepy | |
| mamba activate genomepy | |
| pip install . --no-deps --ignore-installed | |
| # build docs | |
| sphinx-build docs build | |
| touch build/.nojekyll | |
| - name: Deploy 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages # The branch the action should deploy to. | |
| folder: build # The folder the action should deploy. | |
| clean: true |