Skip to content

yet another docs reorg #23

yet another docs reorg

yet another docs reorg #23

name: build-docs-deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}
jobs:
build-python:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v3
- run: pip install poetry
- run: poetry build
docs:
needs: build-python
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v3
- run: pip install poetry
- run: poetry install --with dev,docs
- name: Export notebooks as examples
run: poetry run make ipynb2md
- name: MkDocs build
run: poetry run mkdocs build
- uses: actions/upload-artifact@v3
with:
name: site
path: site
deploy:
needs: docs
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: site
path: site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2