Social Sentiment (1) #1549
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
# This workflow will automatically update data files | |
# For more information see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule | |
name: Social Sentiment (1) | |
on: | |
schedule: | |
- cron: "0 9 * * *" | |
# 5am EST | |
# - cron: "30 10 * * *" | |
# # 6:30am EST | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Update social sentiment | |
env: | |
BATCH: ${{ 1 }} | |
STOCKTWITS: ${{ secrets.STOCKTWITS }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
run: python scripts/update_sentiment.py |