Merge pull request #74 from mathdugre/fix/scraper-api-change #63
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: gen_script | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
gen_script: | |
name: Generate utility functions for the notebooks. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3.0.2 | |
- uses: actions/setup-python@v4.1.0 | |
with: | |
python-version: "3.10" | |
- run: python -m pip install jupyter nbconvert | |
- run: jupyter nbconvert --output-dir ./livingpark_utils/scripts --to script "./livingpark_utils/notebooks/*.ipynb" | |
- run: python livingpark_utils/scripts/_gen_run.py | |
- uses: stefanzweifel/git-auto-commit-action@v4.14.1 | |
with: | |
commit_message: Generated utility functions for the notebooks. | |
branch: main | |
file_pattern: livingpark_utils/scripts/*.py | |
- name: "Files added or updated." | |
if: steps.auto-commit-action.outputs.changes_detected == 'true' | |
run: echo "Committed changes from auto-generation." | |
- name: "Files were not modified." | |
if: steps.auto-commit-action.outputs.changes_detected == 'false' | |
run: echo "Commit skipped. Files were not modified." |