Skip to content

v0.1.5

v0.1.5 #11

# Create documentation for stable (latest version) and deploy
name: BuildDeployStableDocs
on:
# Runs when creating a new release
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
deployments: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "get tags"
run: |
git fetch --tags --force # Retrieve annotated tags.
- name: Get tags
run: git fetch --tags origin
- uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '2.0.2-1' # versions: https://github.com/mamba-org/micromamba-releases
environment-file: ./.github/doc_environment.yml
init-shell: >-
bash
powershell
cache-environment: true
post-cleanup: 'all'
cache-environment-key: environment-${{ steps.date.outputs.date }}
# Not sure why this is needed but it appears to be the case
- name: fix env
shell: bash -l {0}
run: |
micromamba shell init --shell bash --root-prefix=~/micromamba
eval "$(micromamba shell hook --shell bash)"
micromamba activate dascore
- name: install dascore with docbuild reqs
shell: bash -l {0}
run: |
conda install -c conda-forge pandoc
python -m pip install -e .[docs,all]
- name: Install quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.3.450
tinytex: true
- name: print quarto version
run: |
quarto --version
- name: Render Quarto Project
shell: bash -l {0}
run: |
python scripts/build_api_docs.py
quarto render docs
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Zip doc build
run: zip docs.zip docs/_site -r
- name: Upload release docs
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: docs.zip