Daily AI Recipe #3
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: Daily AI Recipe | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" # 06:00 UTC daily | |
| workflow_dispatch: {} | |
| jobs: | |
| generate-daily-recipe: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r backend/requirements.txt | |
| - name: Configure service account key | |
| env: | |
| GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} | |
| run: | | |
| echo "$GCP_SERVICE_ACCOUNT_KEY" > service-account.json | |
| echo "GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/service-account.json" >> $GITHUB_ENV | |
| - name: Run daily recipe generator | |
| env: | |
| HF_API_URL: ${{ secrets.HF_API_URL }} | |
| HF_API_TOKEN: ${{ secrets.HF_API_TOKEN }} | |
| run: | | |
| cd backend | |
| python generate_daily_recipe.py |