Skip to content

Update convert-notebooks.yml #10

Update convert-notebooks.yml

Update convert-notebooks.yml #10

name: Convert MISP playbooks and deploy to GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
convert-notebooks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nbconvert
- name: Convert Jupyter notebooks to HTML
run: |
mkdir -p html-notebooks
find misp-playbooks -name "*.ipynb" -exec jupyter nbconvert --to html --output-dir=html-notebooks {} +
- name: Stage and commit changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add -A # Add all changes, including untracked files
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "Auto-convert notebooks to HTML"
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}