Monthly App Run #17
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: Monthly App Run | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Runs at midnight on the 1st of every month (UTC) | |
# Optionally run workflow manually | |
workflow_dispatch: | |
jobs: | |
run-python-script: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10.6" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Run slowmist.py | |
run: python slowmist.py | |
- name: Run app.py | |
run: python app.py | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | |
- name: check for changes | |
run: git status | |
- name: stage changed files | |
run: git add . | |
- name: authorise git user.email | |
run: git config user.email "tegveerg@bu.edu" | |
- name: authorise git user.name | |
run: git config user.name "TegveerG" | |
- name: commit changed files | |
run: git commit -m "Auto updating csv's" | |
- name: fetch from master | |
run: git fetch origin master | |
- name: push code to master | |
run: git push origin HEAD:master |