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

The script kept failing on deploy (ESM vs CJS issue, plus the
script file wasn't being shipped). User decided not to worry
about it. The 26 manual rows will remain in the sheet without
Entry IDs; the cron will retry them with a manual cleanup
of any duplicates if needed.
This commit is contained in:
Nora
2026-07-03 17:35:44 -06:00
parent b07be10cf9
commit 20c03acdaa
100 changed files with 40396 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"