ci: fix relay deploy (positional path, tolerant diff guard)
This commit is contained in:
1 parent
dc3475afd9
commit
cce6e0ee1f
2 files changed
+4
-2
No files matched your search
@@ -22,10 +22,12 @@ jobs:
|
||||
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
|
||||
run: |
|
||||
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 \
|
||||
--environment e1abb91d-1146-4601-aabf-cfb9a8eef2b2 \
|
||||
--service saw --path live --detach
|
||||
--service saw --detach live
|
||||
else
|
||||
echo "live/ unchanged - skip"
|
||||
fi
|
||||
Reference in new issue
Block a user