Update Database and Push #9076
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: Update Database and Push | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build_and_deploy_db: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout data | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| ref: data | |
| - name: Checkout repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Install dependencies | |
| run: cd scripts && poetry install | |
| - name: Run import script | |
| run: | | |
| git worktree add data data | |
| cd scripts && poetry run python import.py ../data ../static/sb.duckdb.wasm | |
| - name: Deploy DB to R2 | |
| uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3 | |
| with: | |
| command: r2 object put server-radar/sb.duckdb -f static/sb.duckdb.wasm -J eu | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| # NOTE: Auction alert processing moved to worker (AuctionImportDO) | |
| # Worker imports auction data automatically every 5 minutes from Hetzner API | |
| # The /push endpoint has been removed as it's no longer needed | |
| # | |
| # Previous step (now deprecated): | |
| # - name: Push new data to worker | |
| # run: cd scripts && poetry run python push.py ../static/sb.duckdb.wasm | |
| # env: | |
| # API_KEY: ${{ secrets.API_KEY }} |