Skip to content

Commit 3795449

Browse files
committed
added push to cloud
1 parent a2dcff6 commit 3795449

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/panel.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build & Restart Pterodactyl Server
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
10+
environment: production
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: npm
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build project
26+
run: npm run build
27+
28+
- name: Restart Pterodactyl server
29+
run: |
30+
curl -X POST "${{ secrets.PTERO_URL }}/api/client/servers/${{ secrets.SERVER_ID }}/power" \
31+
-H "Authorization: Bearer ${{ secrets.PTERO_KEY }}" \
32+
-H "Content-Type: application/json" \
33+
-H "Accept: Application/vnd.pterodactyl.v1+json" \
34+
-d '{"signal":"restart"}'

0 commit comments

Comments
 (0)