Skip to content

Commit d4347ff

Browse files
ImTotemclaude
andcommitted
revert(infra): restore first-deploy-only workflow import
Workflows now persist in n8n volume with credential links intact. Only import on first deploy, skip if already exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 91f1689 commit d4347ff

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

infra/scripts/init_n8n.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ fi
8080
echo "3. Setting up owner account..."
8181
setup_owner
8282

83-
echo "4. Importing workflows..."
84-
# Force reimport to apply JSON changes (credential links via predefinedCredentialType)
85-
$COMPOSE exec -T n8n n8n import:workflow --input="/workflows/pg_sheets_sync.json" 2>&1
86-
$COMPOSE exec -T n8n n8n import:workflow --input="/workflows/link_auto_expire.json" 2>&1
87-
$COMPOSE exec -T n8n n8n publish:workflow --id="pg-sheets-sync" 2>&1 || true
88-
$COMPOSE exec -T n8n n8n publish:workflow --id="link-auto-expire" 2>&1 || true
83+
echo "4. Importing workflows (first deploy only)..."
84+
import_if_new "/workflows/pg_sheets_sync.json" "pg-sheets-sync"
85+
import_if_new "/workflows/link_auto_expire.json" "link-auto-expire"
8986

9087
echo "=== n8n Init complete ==="

0 commit comments

Comments
 (0)