ci: fix relay deploy (positional path, tolerant diff guard)

This commit is contained in:
E committed 2026-10-02 10:36:36 -04:00
1 parent dc3475afd9
commit cce6e0ee1f
2 files changed
+4 -2

No files matched your search

+4 -2
View File
@@ -22,10 +22,12 @@ jobs:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: | run: |
if [ -z "$RAILWAY_TOKEN" ]; then echo "no RAILWAY_TOKEN secret - skipping"; exit 0; fi if [ -z "$RAILWAY_TOKEN" ]; then echo "no RAILWAY_TOKEN secret - skipping"; exit 0; fi
if ! git diff --quiet "$GITHUB_EVENT_BEFORE" "$GITHUB_SHA" -- live/; then # GITHUB_EVENT_BEFORE is empty on some push events; treat that as
# "deploy" rather than erroring on a bad revision
if [ -z "$GITHUB_EVENT_BEFORE" ] || ! git diff --quiet "$GITHUB_EVENT_BEFORE" "$GITHUB_SHA" -- live/ 2>/dev/null; then
npx -y @railway/cli@latest up --project 11f1d169-3b88-40e7-a054-f4b79e89c138 \ npx -y @railway/cli@latest up --project 11f1d169-3b88-40e7-a054-f4b79e89c138 \
--environment e1abb91d-1146-4601-aabf-cfb9a8eef2b2 \ --environment e1abb91d-1146-4601-aabf-cfb9a8eef2b2 \
--service saw --path live --detach --service saw --detach live
else else
echo "live/ unchanged - skip" echo "live/ unchanged - skip"
fi fi
View File
Whitespace-only changes.