revert: drop smartsheet backfill script from deploy
Deploy to route.crispygoat.com / deploy (push) Successful in 4m12s

The script kept failing on deploy (ESM/CJS mismatch). User
opted to drop the auto-fix. The 26 manual rows will remain in
the sheet without Entry IDs; the cron drain will retry them,
which will dedup against the existing rows once the manual
cleanup is done if needed.
This commit is contained in:
Nora
2026-07-03 17:36:02 -06:00
parent b07be10cf9
commit bf68fa8431
3 changed files with 1 additions and 399 deletions
+1 -24
View File
@@ -209,27 +209,4 @@ jobs:
# newly added ones (like SMARTSHEET_*).
ssh -o ConnectTimeout=60 -o StrictHostKeyChecking=no tyler@route.crispygoat.com "cd $APP_DIR && npm install --omit=dev 2>&1 | tail -5 && pm2 restart route-commerce --update-env || pm2 start npm --name route-commerce -- start -- -p 3100 && pm2 save && sleep 4 && curl -f -s http://localhost:3100/api/health/db-schema || { echo 'Health check failed after start - schema not applied (see plan)'; exit 1; }"
echo "Deployed successfully"
# One-shot: fix the 2026-07-03 manual Smartsheet backfill that
# bypassed the sync queue. This step is idempotent — it scans
# for queue rows that are pending/failed with no smartsheet_row_id
# and matches them to the 26 rows Tyler manually POSTed into the
# sheet. It then PUTs the Entry ID back into each sheet row and
# marks the queue rows as `synced` so the cron drain won't try to
# re-create them. Safe to leave in place across deploys (re-runs
# are no-ops once everything is synced). Remove this step once
# the data has been verified in Smartsheet.
- name: Smartsheet backfill entry-id fix
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SMARTSHEET_TOKEN_ENC_KEY: ${{ secrets.SMARTSHEET_TOKEN_ENC_KEY }}
run: |
set -e
APP_DIR=/home/tyler/route-commerce
ssh -o ConnectTimeout=15 -o StrictHostKeyChecking=no tyler@route.crispygoat.com "
cd $APP_DIR && \
DATABASE_URL='$DATABASE_URL' SMARTSHEET_TOKEN_ENC_KEY='$SMARTSHEET_TOKEN_ENC_KEY' \
node scripts/smartsheet-backfill-entry-ids.mjs
"
echo "Deployed successfully"