Fixes #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Gipsy Beta | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- beta | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # fetch all history | |
submodules: recursive | |
- name: Deploy to server | |
uses: swznd/sftp-deploy@master | |
with: | |
host: ${{ secrets.BETA_SFTP_IP }} | |
port: ${{ secrets.BETA_SFTP_PORT }} | |
user: ${{ secrets.BETA_SFTP_USER }} | |
password: ${{ secrets.BETA_SFTP_PASSWORD }} | |
ignore: .github/**,.gitignore,**/.gitignore,**/.git/** | |
- name: Restart running bot | |
env: | |
GIPSY_RESTART_BETA_ENDPOINT: ${{ secrets.GIPSY_RESTART_BETA_ENDPOINT }} | |
GIPSY_RESTART_BETA_BEARER: ${{ secrets.GIPSY_RESTART_BETA_BEARER }} | |
run: | | |
curl $GIPSY_RESTART_BETA_ENDPOINT \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-H "Authorization: Bearer $GIPSY_RESTART_BETA_BEARER" \ | |
-X POST \ | |
-d '{ | |
"signal": "restart" | |
}' |