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
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,24 @@ jobs:

- name: Invalidate Cloudfront
run: aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_output.outputs.distribution_id }} --paths "/*"

- name: Check for uncommitted changes
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"

echo "Git status after build:"
git status

CHANGES="$(git status --porcelain)"
if [ -n "$CHANGES" ]; then
echo "❌ Uncommitted changes detected in the repository."
echo "These files changed (format: XY path):"
echo "$CHANGES"

echo "::error::Your deployment produced uncommitted changes. \
This usually means something should be added to .gitignore or a lockfile/other tracked file needs updating."
exit 1
else
echo "✅ No uncommitted changes after deploy."
fi