name: 01.2. Backup-based Curation on: workflow_dispatch: inputs: backup_file: description: 'Path to the backup file (JSON or MD) inside the repository' required: true default: 'data/backup_posts.json' historical_mode: description: 'Activate Historical Mode (Ignores 30-day limit)' required: false default: 'true' type: boolean permissions: contents: write pull-requests: write jobs: backup-curation-process: runs-on: ubuntu-latest steps: - name: Repository Synchronization uses: actions/checkout@v7 - name: Python 3.11 Environment Provisioning uses: actions/setup-python@v6 with: python-version: '3.11' cache: 'pip' - name: Installation of Dependencies run: | python -m pip install --upgrade pip pip install --no-cache-dir pydantic PyGithub aiohttp beautifulsoup4 httpx fake-useragent pytz python-dotenv twikit>=2.1.2 playwright playwright-stealth tenacity # Playwright is required because Gemini evaluator or curator might use it indirectly, # even if backup extraction doesn't strictly need it. playwright install chromium --with-deps - name: Agentic Curation Execution (Backup Mode) env: GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }} GEMINI_API_KEY_2: ${{ secrets.GEMINI_API_KEY_2 }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} BACKUP_FILE: ${{ github.event.inputs.backup_file }} HISTORICAL_MODE: ${{ github.event.inputs.historical_mode }} PYTHONPATH: . PYTHONUNBUFFERED: "1" run: | if [ ! -f "$BACKUP_FILE" ]; then echo "❌ ERROR: File '$BACKUP_FILE' not found in repository." echo "Please upload the file to that path and try again." exit 1 fi python src/main.py