Skip to content

add GitHub Actions to run nb for generate html #1

add GitHub Actions to run nb for generate html

add GitHub Actions to run nb for generate html #1

Workflow file for this run

name: Run Jupyter Notebook and Generate HTML
on:
push:
branches:
- main
workflow_dispatch:
jobs:
execute_notebook:
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.10'
- name: Install dependencies
run: |
pip install notebook pandas matplotlib plotly nbconvert
- name: Run Jupyter Notebook
run: |
jupyter nbconvert --to notebook --execute --inplace *.ipynb
mkdir -p docs
- name: Move HTML file
run: |
mv ./insurance_comparison.html ./docs/insurance_comparison.html
- name: Commit and Push HTML file
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add docs/insurance_comparison.html
git commit -m "Auto-generated insurance comparison HTML"
git push
continue-on-error: true