We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2dcff6 commit 3795449Copy full SHA for 3795449
1 file changed
.github/workflows/panel.yml
@@ -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