dev #2

Merged
ksenia_mikhailova merged 6 commits from dev into main 2024-07-04 10:47:25 +03:00
1 changed files with 3 additions and 18 deletions
Showing only changes of commit 6137a05607 - Show all commits

View File

@ -3,7 +3,7 @@ name: Deploy
on: on:
push: push:
branches: branches:
- testing # Adjust the branch as needed - dev # Adjust the branch as needed
jobs: jobs:
build_and_push_images: build_and_push_images:
@ -30,31 +30,16 @@ jobs:
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
- name: Copy files to host - name: SSH into host down-up docker
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
uses: appleboy/ssh-action@master uses: appleboy/ssh-action@master
env: env:
KASSA_ID: ${{ secrets.KASSA_ID_DEV }} 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: with:
host: ${{ secrets.SSH_HOST }} host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }} username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }} key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }} port: ${{ secrets.SSH_PORT }}
envs: KASSA_ID, KASSA_TOKEN, TICKET_DB, DB_USER, DB_PASSWORD, TERMINAL_ID envs: KASSA_ID
script: | script: |
cd /opt/app/ cd /opt/app/
echo "restart container" echo "restart container"