Run Python Code #6
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: Run Python Code | |
on: | |
# schedule: | |
# - cron: '0 */24 * * *' | |
workflow_dispatch: | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
jobs: | |
run-code: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install system dependencies | |
run: sudo apt-get update && sudo apt-get install -y build-essential libffi-dev | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Python script | |
run: python app.py |