Skip to content

Update deploy-gh-pages.yml #6

Update deploy-gh-pages.yml

Update deploy-gh-pages.yml #6

name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main # Trigger only on changes to the main branch
workflow_dispatch: # Allows manual trigger
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install nbconvert
- name: Convert Jupyter notebooks to HTML
run: |
find misp-playbooks -name "*.ipynb" -exec jupyter nbconvert --to html {} \;
- name: Create index.html
run: |
mkdir -p _site
echo "hello" > _site/index.html
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
branch: gh-pages
force_orphan: true # Ensure gh-pages branch only contains docs