Skip to content

Commit 5eea311

Browse files
committed
update action
1 parent e1eba20 commit 5eea311

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@ on:
44
push:
55
branches:
66
- retina # Change to your deployment branch
7+
paths-ignore:
8+
- '**.md' # Ignore markdown file updates if necessary
79

810
jobs:
9-
deploy-to-render:
10-
needs: build-and-push # Ensure this runs only after the Docker image is pushed
11+
deploy:
12+
if: github.event.head_commit.parent_ids # Ensures it's not an empty commit (merge commits have multiple parents)
1113
runs-on: ubuntu-latest
1214

1315
steps:
1416
- name: Trigger Render Deployment
15-
run: |
16-
curl -X POST "$RENDER_DEPLOY_HOOK"
1717
env:
18-
RENDER_DEPLOY_HOOK: ${{ secrets.RENDER_DEPLOY_HOOK }}
18+
RENDER_DEPLOY_HOOK: ${{ secrets.RENDER_DEPLOY_HOOK }}
19+
run: |
20+
if [[ -z "$RENDER_DEPLOY_HOOK" ]]; then
21+
echo "Error: RENDER_DEPLOY_HOOK is not set."
22+
exit 1
23+
fi
24+
curl -X POST "$RENDER_DEPLOY_HOOK" || { echo "Render deployment trigger failed"; exit 1; }

0 commit comments

Comments
 (0)