diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..7bb08d6 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy to Pterodactyl + +on: + push: + branches: + - main + - master + +jobs: + reinstall-server: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Call Pterodactyl API to reinstall server + env: + PTERODACTYL_URL: ${{ secrets.PTERODACTYL_URL }} + PTERODACTYL_API_KEY: ${{ secrets.PTERODACTYL_API_KEY }} + PTERODACTYL_SERVER_ID: ${{ secrets.PTERODACTYL_SERVER_ID }} + run: | + curl -X POST "${{ env.PTERODACTYL_URL }}/api/application/servers/${{ env.PTERODACTYL_SERVER_ID }}/reinstall" \ + -H "Authorization: Bearer ${{ env.PTERODACTYL_API_KEY }}" \ + -H "Accept: application/json" \ + -H "Content-Type: application/json"