Skip to content

Commit c1f11ec

Browse files
author
Ashank
committed
Add GitHub Actions workflow to restart server via Pterodactyl API on push to main
1 parent 6708fff commit c1f11ec

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Restart Server
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
restart:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Restart server via Pterodactyl API
13+
run: |
14+
curl "https://panel.sear.host/ca22b579/power" \
15+
-H "Accept: application/json" \
16+
-H "Content-Type: application/json" \
17+
-H "Authorization: Bearer ${{ secrets.PTERODACTYL_API_KEY }}" \
18+
-X POST \
19+
-d '{
20+
"signal": "restart"
21+
}'

0 commit comments

Comments
 (0)