Tweak documentation section #59
This file contains 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: Build documentation and upload artifact | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
branches: main | |
env: | |
# Directory that will be published on github pages | |
PUBLISH_DIR: ./_build/html | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install . | |
- name: Build docs | |
run: jupyter book build . | |
- name: Use Node v18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Build slides | |
run: | | |
for doc in $(ls docs/*.md); do | |
npx @marp-team/marp-cli ${doc} --html -o ${{ env.PUBLISH_DIR }}/$(basename ${doc::-3})-slides.html | |
done | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ env.PUBLISH_DIR }} | |
if-no-files-found: error | |
name: documentation |