Skip to content

Commit 80478a8

Browse files
ImTotemclaude
andcommitted
fix(infra): force replace n8n workflows on every deploy
Delete existing workflows before importing to ensure updates are applied, not skipped. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9759ffc commit 80478a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

infra/scripts/init_n8n.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,14 @@ setup_owner
124124
echo "4. Setting up Postgres credential..."
125125
setup_pg_credential
126126

127-
echo "5. Cleaning up old workflows..."
127+
echo "5. Replacing workflows..."
128128
delete_workflow "Link Auto-Expiration (hourly)"
129+
delete_workflow "Link Auto-Expiration (1min)"
130+
delete_workflow "PG → Sheets Sync (5min)"
129131

130132
echo "6. Importing workflows..."
131-
import_workflow "/workflows/pg_sheets_sync.json" "PG → Sheets Sync (5min)"
132-
import_workflow "/workflows/link_auto_expire.json" "Link Auto-Expiration (1min)"
133+
$COMPOSE exec -T n8n n8n import:workflow --input="/workflows/pg_sheets_sync.json" 2>&1
134+
$COMPOSE exec -T n8n n8n import:workflow --input="/workflows/link_auto_expire.json" 2>&1
133135

134136
echo "=== n8n Init complete ==="
135137
echo "NOTE: Set up Google Sheets credential in n8n UI if first deploy"

0 commit comments

Comments
 (0)