fixed img issue #11
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: Build .ipnyb and .rmd files to HTML in dist | |
on: | |
push: | |
branches: | |
- master # or your preferred branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Cache pip packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install nbconvert | |
- name: Convert Notebooks | |
run: | | |
for notebook in submissions/*.ipynb; do | |
jupyter nbconvert --to html "$notebook" --output-dir dist | |
done | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: converted-html | |
path: dist/ | |
- name: Commit and push | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add dist/* | |
git commit -m "Add converted HTML files" -a | |
git push | |