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
7 changes: 5 additions & 2 deletions .github/workflows/deploy-lightsail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ jobs:
set -eu
cd "$APP_DIR"

git fetch --prune origin
git cat-file -e "$COMMIT_SHA^{commit}"
git fetch --prune origin +refs/heads/main:refs/remotes/origin/main
if ! git merge-base --is-ancestor "$COMMIT_SHA" origin/main; then
echo "Commit $COMMIT_SHA is not on origin/main after fetch; refusing to deploy unverified code. Re-run the workflow for the current main commit." >&2
exit 1
fi
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
git reset --hard "$COMMIT_SHA"

npm ci
Expand Down