steps wait for all inputs to be complete before triggering #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Convert Jupyter Notebook to HTML | |
on: | |
push: | |
paths: | |
- 'notebooks/process-bigraphs.ipynb' | |
jobs: | |
convert: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@main | |
with: | |
ref: main | |
fetch-depth: 0 # Fetch all history to have access to the gh-pages branch | |
- name: Set up Python | |
uses: actions/setup-python@main | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install nbconvert | |
- name: Convert Jupyter Notebook to HTML | |
run: | | |
jupyter nbconvert --to html notebooks/process-bigraphs.ipynb | |
- name: Commit and push HTML to gh-pages branch | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git fetch origin | |
mv notebooks/process-bigraphs.html /tmp/process-bigraphs.html | |
git checkout gh-pages || git checkout -b gh-pages | |
git pull origin gh-pages | |
mv /tmp/process-bigraphs.html notebooks/process-bigraphs.html | |
git add notebooks/process-bigraphs.html | |
git diff-index --quiet HEAD || git commit -m "Update HTML file" | |
git push origin gh-pages || true |