-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.93 KB
/
deploy.yml
File metadata and controls
63 lines (54 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Deploy
on:
check_run:
types: [requested_action, rerequested]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
#on:
# push:
# branches:
# - main
jobs:
workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Remove directories
run: rm -r .github .git
- name: Upload files
uses: wlixcc/SFTP-Deploy-Action@v1.2.6
with:
server: ${{ secrets.SFTP_HOST }}
port: ${{ secrets.SFTP_PORT }}
username: ${{ secrets.SFTP_USER }}
password: ${{ secrets.SFTP_PASS }}
local_path: './'
remote_path: './'
sftp_only: true
- name: Stop the Pterodactyl server
shell: bash
run: |
curl --request POST \
--url ${{ secrets.BASE_URL }}api/client/servers/${{ secrets.SERVER_ID }}/power \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${{ secrets.API_KEY }}' \
--header 'Content-Type: application/json' \
--data '{ "signal": "stop" }'
- name: Kill the Pterodactyl server
shell: bash
run: |
curl --request POST \
--url ${{ secrets.BASE_URL }}api/client/servers/${{ secrets.SERVER_ID }}/power \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${{ secrets.API_KEY }}' \
--header 'Content-Type: application/json' \
--data '{ "signal": "kill" }'
- name: Start the Pterodactyl server
shell: bash
run: |
curl --request POST \
--url ${{ secrets.BASE_URL }}api/client/servers/${{ secrets.SERVER_ID }}/power \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${{ secrets.API_KEY }}' \
--header 'Content-Type: application/json' \
--data '{ "signal": "start" }'