Spaces:
Running
Running
| name: Auto Sync Products | |
| on: | |
| schedule: | |
| # Run daily at 00:00 UTC (8:00 AM Vietnam time) | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| 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 huggingface_hub datasets | |
| - name: Run auto-sync | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| python3 sync_products.py | |