Skip to content

Update km_company

Update km_company #563

name: Update km_company
on:
schedule:
- cron: "0 12 * * *"
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.11
- name: Install Jupyter kernel
run: |
python -m pip install ipykernel
python -m ipykernel install --user
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install papermill
- name: Execute notebook
run: |
papermill "KM Extract.ipynb" output.ipynb
- name: Delete output notebook
run: |
rm output.ipynb
- name: Commit and push if it changed
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add km_company.json
git diff --quiet && git diff --staged --quiet || git commit -m "Updated on $(date +'%B %d %Y')"
git push