test deploy
This commit is contained in:
parent
c96ae0acf5
commit
6137a05607
|
@ -3,7 +3,7 @@ name: Deploy
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- testing # Adjust the branch as needed
|
||||
- dev # Adjust the branch as needed
|
||||
|
||||
jobs:
|
||||
build_and_push_images:
|
||||
|
@ -30,31 +30,16 @@ jobs:
|
|||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
|
||||
- name: Copy files to host
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
source: "deploy/*,docker-compose.yml,nginx/nginx.conf"
|
||||
target: /opt/app/
|
||||
|
||||
- name: SSH into host and execute script
|
||||
- name: SSH into host down-up docker
|
||||
uses: appleboy/ssh-action@master
|
||||
env:
|
||||
KASSA_ID: ${{ secrets.KASSA_ID_DEV }}
|
||||
KASSA_TOKEN: ${{ secrets.KASSA_TOKEN_DEV }}
|
||||
TICKET_DB: ${{ secrets.TICKET_DB_DEV }}
|
||||
DB_USER_: ${{ secrets.DB_USER_DEV }}
|
||||
DB_PASSWORD: ${{ secrets.DB_PASSWORD_DEV }}
|
||||
TERMINAL_ID: 1
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
envs: KASSA_ID, KASSA_TOKEN, TICKET_DB, DB_USER, DB_PASSWORD, TERMINAL_ID
|
||||
envs: KASSA_ID
|
||||
script: |
|
||||
cd /opt/app/
|
||||
echo "restart container"
|
||||
|
|
Loading…
Reference in New Issue