update #105
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: 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 }}" |