fix(ci): fix YAML parse error in deploy workflow caused by inner heredoc
Some checks failed
Deploy — Staging / Lint, Typecheck & Test (push) Successful in 1m29s
Deploy — Staging / Build & push — admin (push) Successful in 54s
Deploy — Staging / Build & push — storefront (push) Successful in 53s
Deploy — Staging / Deploy to staging VPS (push) Failing after 24s

The compose file was written via a bash << 'COMPOSE' heredoc nested inside
the YAML run: | block scalar. Lines like "name: petloft-staging" at column 0
cause the YAML parser to break out of the block scalar early, making the
entire workflow file invalid YAML — Gitea silently drops invalid workflows,
so no jobs triggered at all.

Fix: move compose.yml to deploy/staging/compose.yml in the repo, substitute
${REGISTRY} on the runner, base64-encode the result, and decode it on the VPS
inside the SSH session. No inner heredoc needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 11:37:02 +03:00
parent b333047753
commit 439d6d4455
2 changed files with 30 additions and 30 deletions

View File

@@ -0,0 +1,20 @@
name: petloft-staging
services:
storefront:
image: ${REGISTRY}/storefront:staging
restart: unless-stopped
ports:
- "3000:3000"
env_file:
- path: .env
required: false
admin:
image: ${REGISTRY}/admin:staging
restart: unless-stopped
ports:
- "3001:3001"
env_file:
- path: .env
required: false