Skip to content

update

update #116

name: update
on:
workflow_dispatch:
schedule:
- cron: '42 4 * * *'
# Update the personalized recommendations of each user
# This happens every 24 hours (every day at 4:42 AM)
jobs:
update:
name: update recommendations
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: requirements.txt
- name: Install dependencies
run: pip install -r requirements.txt
- name: Update recommendations in database
run: python update_database.py
env:
POSTGRES_USER: "${{ secrets.POSTGRES_USER }}"
POSTGRES_PASSWORD: "${{ secrets.POSTGRES_PASSWORD }}"
POSTGRES_HOST: "${{ secrets.POSTGRES_HOST }}"
POSTGRES_DB: "${{ secrets.POSTGRES_DB }}"