Update Steam Database #210
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: Update Steam Database | |
on: | |
schedule: | |
- cron: '0 13 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests tqdm janome scikit-learn numpy psycopg2-binary python-dotenv | |
- name: Fetch top games from Twitch and Steam | |
run: python fetch_top_games.py | |
env: | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
PGHOST: ${{ secrets.PGHOST }} | |
PGPORT: ${{ secrets.PGPORT }} | |
PGDATABASE: ${{ secrets.PGDATABASE }} | |
PGUSER: ${{ secrets.PGUSER }} | |
PGPASSWORD: ${{ secrets.PGPASSWORD }} | |
working-directory: ./steam | |
- name: Fetch and parse Steam details | |
run: python fetch_and_parse_steam.py | |
working-directory: ./steam | |
- name: Insert data into PostgreSQL database | |
run: python insert_data_to_db.py | |
env: | |
PGHOST: ${{ secrets.PGHOST }} | |
PGPORT: ${{ secrets.PGPORT }} | |
PGDATABASE: ${{ secrets.PGDATABASE }} | |
PGUSER: ${{ secrets.PGUSER }} | |
PGPASSWORD: ${{ secrets.PGPASSWORD }} | |
working-directory: ./steam | |
- name: Finish | |
run: echo "All scripts executed successfully." |