Skip to content

Commit

Permalink
Merge pull request #38 from Coho04/Coho04-patch-1
Browse files Browse the repository at this point in the history
Create deploy.yml
  • Loading branch information
Coho04 authored Nov 17, 2024
2 parents cb866df + 6513034 commit 4ca2fd3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Restart Pterodactyl Server

on:
push:
branches:
- main

jobs:
restart_pterodactyl_server:
runs-on: ubuntu-latest

steps:
- name: Restart Server via Pterodactyl API
env:
PTERODACTYL_API_KEY: ${{ secrets.PTERODACTYL_API_KEY }}
SERVER_ID: ${{ vars.PTERODACTYL_SERVER_ID }}
run: |
echo "Restarting server with ID: ${SERVER_ID}"
curl -X POST "https://panel.golden-developer.de/api/client/servers/${SERVER_ID}/power" \
-H "Authorization: Bearer $PTERODACTYL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"signal": "restart"}'

0 comments on commit 4ca2fd3

Please sign in to comment.