Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/sync-to-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@ jobs:
echo "Commit: ${{ github.sha }}"
echo ""

set +e
OUTPUT=$(workspace-push . ${{ env.STAGING_WORKSPACE_URL }} --delete 2>&1)
EXIT_CODE=$?
set -e
echo "$OUTPUT"

echo "SYNC_OUTPUT<<EOF" >> $GITHUB_OUTPUT
echo "$OUTPUT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo ""
if [ $EXIT_CODE -ne 0 ]; then
echo "Staging workspace sync failed with exit code $EXIT_CODE"
exit $EXIT_CODE
fi
echo "Staging workspace sync completed successfully!"

- name: Sync to production workspace
Expand All @@ -64,14 +70,20 @@ jobs:
echo "Commit: ${{ github.sha }}"
echo ""

set +e
OUTPUT=$(workspace-push . ${{ env.PRODUCTION_WORKSPACE_URL }} --delete 2>&1)
EXIT_CODE=$?
set -e
echo "$OUTPUT"

echo "SYNC_OUTPUT<<EOF" >> $GITHUB_OUTPUT
echo "$OUTPUT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo ""
if [ $EXIT_CODE -ne 0 ]; then
echo "Production workspace sync failed with exit code $EXIT_CODE"
exit $EXIT_CODE
fi
echo "Production workspace sync completed successfully!"

- name: Report sync status
Expand Down
Loading