-
Notifications
You must be signed in to change notification settings - Fork 14
37 lines (29 loc) · 853 Bytes
/
docs.yml
File metadata and controls
37 lines (29 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Docs
on:
workflow_call:
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Fail if branch is not main
run: |
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
echo "This workflow can only be run on the main branch."
exit 1
fi
- name: Checkout
uses: actions/checkout@v3
- name: Setup python and poetry
uses: ./.github/actions/python-poetry
with:
groups: "docs"
- name: Generate notebook examples
run: |
poetry run jupyter nbconvert --to markdown --allow-errors --output-dir docs/examples tutorials/*.ipynb
- name: Deploy docs
run: |
poetry run mkdocs gh-deploy --force