Skip to content

Commit 4741b68

Browse files
authored
Update main.yml
1 parent c7cbfd7 commit 4741b68

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,25 @@ jobs:
4646
- name: Build with Maven
4747
run: mvn clean package -DskipTests
4848

49-
# Step 5: (Optional) Run tests
49+
# Step 5: Run tests
5050
- name: Run tests
5151
run: mvn test
5252

53-
# Step 6: (Optional) List the generated jar
53+
# Step 6: List the generated jar
5454
- name: List target directory
5555
run: ls -l target/
56+
57+
# Step 7 Trigger deployment via webhook
58+
- name: Trigger deployment via webhook
59+
env:
60+
DEPLOY_HOOK_URL: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
61+
run: |
62+
echo "Triggering deployment..."
63+
curl -X POST "$DEPLOY_HOOK_URL"
64+
echo "Deployment triggered via webhook."
65+
66+
# Step 8: Wait a few seconds for deployment to register
67+
- name: Wait for deployment to start
68+
run: |
69+
sleep 10
70+
echo "Deployment started! wait for 5 min and try opening https://randomchat-hfta.onrender.com"

0 commit comments

Comments
 (0)