Skip to content

Commit e4da650

Browse files
committed
yaml
1 parent a61f385 commit e4da650

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/convert-and-publish.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,36 @@ jobs:
1818
with:
1919
python-version: '3.12'
2020

21+
- name: Install Poetry
22+
run: |
23+
curl -sSL https://install.python-poetry.org | python3 -
24+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $GITHUB_ENV
25+
export PATH="$HOME/.local/bin:$PATH"
26+
2127
- name: Install Dependencies
2228
run: |
23-
python -m pip install --upgrade pip
24-
pip install jupyter nbconvert quarto-cli
29+
poetry install
2530
2631
- name: Convert Notebooks to QMD
2732
run: |
2833
mkdir -p qmd
2934
for notebook in $(find . -name "*.ipynb"); do
30-
jupyter nbconvert --to markdown --output-dir=qmd "$notebook"
35+
poetry run jupyter nbconvert --to markdown --output-dir=qmd "$notebook"
3136
done
3237
3338
- name: Create Index File
3439
run: |
3540
echo "# Index" > qmd/index.qmd
3641
for file in $(ls qmd/*.md); do
37-
title=$(basename "$file" .md)
38-
echo "- [$title](./$title.html)" >> qmd/index.qmd
42+
title=$(basename "$file" .md)
43+
echo "- [$title](./$title.html)" >> qmd/index.qmd
3944
done
4045
4146
- name: Render QMD Files
4247
run: |
4348
mkdir -p rendered
4449
for qmd in $(find qmd -name "*.qmd"); do
45-
quarto render "$qmd" --to html --output-dir rendered
50+
poetry run quarto render "$qmd" --to html --output-dir rendered
4651
done
4752
4853
- name: Move rendered files to docs
@@ -55,4 +60,4 @@ jobs:
5560
uses: ad-m/[email protected]
5661
with:
5762
github_token: ${{ secrets.GITHUB_TOKEN }}
58-
branch: main
63+
branch: main

0 commit comments

Comments
 (0)