Skip to content

Commit 09c560b

Browse files
owineclaude
andcommitted
fix: add compose-workflow checkout for deployment scripts
The deploy workflow was failing because deployment scripts were not available on the runner. Added checkout step for compose-workflow repository to make scripts/deployment/ available. Issue: - docker-piwine-office deployment failed with "No such file or directory" - Error: ./scripts/deployment/lib/ssh-helpers.sh not found - Target repository checkout doesn't include compose-workflow scripts Solution: - Added checkout step for owine/compose-workflow@main - Checkout to .compose-workflow/ path - Updated all script references to use .compose-workflow/ prefix: - ssh-helpers.sh (2 occurrences) - detect-removed-stacks.sh - deploy-stacks.sh - health-check.sh (2 occurrences) - rollback-stacks.sh This mirrors the fix already applied to lint.yml in commit a6bf189. Fixes: Run #20542794665 in docker-piwine-office Validated: actionlint passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent a6bf189 commit 09c560b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,18 @@ jobs:
312312
with:
313313
fetch-depth: 0 # Fetch full history for accurate change detection
314314

315+
- name: Checkout compose-workflow for deployment scripts
316+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
317+
with:
318+
repository: owine/compose-workflow
319+
ref: main
320+
path: .compose-workflow
321+
315322
- name: Determine previous deployment SHA
316323
id: determine-previous
317324
run: |
318325
# Use retry mechanism for SSH connection
319-
source ./scripts/deployment/lib/ssh-helpers.sh
326+
source ./.compose-workflow/scripts/deployment/lib/ssh-helpers.sh
320327
321328
# Get current deployment SHA with error handling
322329
echo "🔍 Checking current deployment SHA for change detection..."
@@ -350,7 +357,7 @@ jobs:
350357
run: |
351358
echo "::group::Preparing deployment backup"
352359
# Use retry mechanism for SSH connection
353-
source ./scripts/deployment/lib/ssh-helpers.sh
360+
source ./.compose-workflow/scripts/deployment/lib/ssh-helpers.sh
354361
355362
# Get current deployment SHA with error handling
356363
echo "🔍 Checking current deployment SHA..."
@@ -426,7 +433,7 @@ jobs:
426433
if: steps.backup.outputs.deployment_needed == 'true'
427434
continue-on-error: false
428435
run: |
429-
./scripts/deployment/detect-removed-stacks.sh \
436+
./.compose-workflow/scripts/deployment/detect-removed-stacks.sh \
430437
--current-sha "${{ steps.backup.outputs.previous_sha }}" \
431438
--target-ref "${{ inputs.target-ref }}" \
432439
--deleted-files '${{ steps.changed-files.outputs.deleted_files }}' \
@@ -481,7 +488,7 @@ jobs:
481488
if: steps.backup.outputs.deployment_needed == 'true'
482489
continue-on-error: true
483490
run: |
484-
./scripts/deployment/deploy-stacks.sh \
491+
./.compose-workflow/scripts/deployment/deploy-stacks.sh \
485492
--stacks "${{ join(fromJSON(inputs.stacks), ' ') }}" \
486493
--has-dockge "${{ inputs.has-dockge }}" \
487494
--target-ref "${{ inputs.target-ref }}" \
@@ -500,7 +507,7 @@ jobs:
500507
id: health
501508
if: steps.backup.outputs.deployment_needed == 'true' && steps.deploy.outcome == 'success'
502509
run: |
503-
./scripts/deployment/health-check.sh \
510+
./.compose-workflow/scripts/deployment/health-check.sh \
504511
--stacks "${{ join(fromJSON(inputs.stacks), ' ') }}" \
505512
--has-dockge "${{ inputs.has-dockge }}" \
506513
--ssh-user "${{ secrets.SSH_USER }}" \
@@ -532,7 +539,7 @@ jobs:
532539
echo "Previous SHA: ${{ steps.backup.outputs.previous_sha }}"
533540
echo "Failed SHA: ${{ inputs.target-ref }}"
534541
535-
./scripts/deployment/rollback-stacks.sh \
542+
./.compose-workflow/scripts/deployment/rollback-stacks.sh \
536543
--previous-sha "${{ steps.backup.outputs.previous_sha }}" \
537544
--has-dockge "${{ inputs.has-dockge }}" \
538545
--compose-args "${{ inputs.args || '' }}" \
@@ -576,7 +583,7 @@ jobs:
576583
TEMP_OUTPUT=$(mktemp)
577584
578585
# Call health-check.sh with rollback context
579-
if GITHUB_OUTPUT="$TEMP_OUTPUT" ./scripts/deployment/health-check.sh \
586+
if GITHUB_OUTPUT="$TEMP_OUTPUT" ./.compose-workflow/scripts/deployment/health-check.sh \
580587
--stacks "$STACKS" \
581588
--has-dockge "${{ inputs.has-dockge }}" \
582589
--ssh-user "${{ secrets.SSH_USER }}" \

0 commit comments

Comments
 (0)