-
Notifications
You must be signed in to change notification settings - Fork 43
53 lines (44 loc) · 1.49 KB
/
convert_notebooks.yml
File metadata and controls
53 lines (44 loc) · 1.49 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Convert Notebooks to Markdown
on:
push:
branches: [master]
paths:
- 'docs/examples/*.ipynb'
- 'docs/convert_notebooks.py'
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
pull-requests: write
jobs:
convert-notebooks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Convert notebooks to Markdown
run: |
cd docs
python convert_notebooks.py
- name: Check for changes
id: git-check
run: |
git diff --exit-code docs/examples/*.md || echo "changes=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.git-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Auto-convert notebooks to Markdown for GitHub Pages"
title: "docs: Auto-convert notebooks to Markdown"
body: |
This PR was automatically generated to convert Jupyter notebooks to Markdown for GitHub Pages.
Changes include updated markdown versions of notebooks in `docs/examples/`.
branch: auto-convert-notebooks
delete-branch: true
labels: documentation, automated