statistics #119
This file contains hidden or 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: statistics | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 17 * * 5' # 15:00 CET = 14:00 UTC winter time / 15:00 CEST = 13:00 UTC | |
| jobs: | |
| nbconvertstats: | |
| runs-on: ubuntu-latest | |
| name: stats_nbconvert | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@v3 | |
| - name: deleting stats branch if exists | |
| shell: bash | |
| run: | | |
| git push origin -d stats &>/dev/null || true | |
| - name: extracting branch name & creating the new stats branch | |
| shell: bash | |
| run: | | |
| git checkout -b stats | |
| git push -u origin stats | |
| id: creating_branch | |
| - name: installing nbconvert & other required libraries | |
| run: | | |
| python -m pip install jupyter nbconvert nbformat notebook pandas matplotlib | |
| - name: setting up credentials | |
| run: | | |
| python3 defineenv.py "${{ secrets.JDH_USERNAME }}" "${{ secrets.JDH_PASSWORD }}" "${{ secrets.JDH_GITHUB_API }}" | |
| - name: running nbconvert | |
| run: | | |
| jupyter nbconvert --execute --to notebook --inplace --ExecutePreprocessor.timeout=-1 jdh_statistics.ipynb | |
| - name: deleting credentials from local environment | |
| run: | | |
| rm "credentials.json" | |
| - name: committing changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: Automated commit | |
| branch: stats | |
| create_branch: true |