Skip to content

Commit

Permalink
i want to sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
rasulov1337 committed Dec 15, 2024
1 parent 2f02bcb commit 8be179a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@ on:
branches: ["deploy"]

jobs:
build-and-deploy:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Copy context to server
uses: appleboy/[email protected]
- name: Checkout code
uses: actions/checkout@v4
- name: Install rsync
run: sudo apt-get update && sudo apt-get install -y rsync
- name: Copy code to server using rsync
uses: appleboy/ssh-action@master
with:
host: 37.139.41.110
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "./"
target: "/opt/backend-deploy/"

script: |
rsync -avz -e "ssh -p 22" ./ [email protected]:/opt/backend-deploy/
- name: Build and deploy on server
uses: appleboy/ssh-action@master
with:
host: 37.139.41.110
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
sudo apt update && sudo apt install -y docker.io docker-compose
cd /opt/backend-deploy/
sudo docker-compose pull # Pull latest images if you are using a registry
sudo docker-compose build --no-cache # Build services
sudo docker-compose up -d --remove-orphans # Start services in detached mode
sudo docker-compose build --no-cache
sudo docker-compose up -d --remove-orphans
13 changes: 0 additions & 13 deletions .github/workflows/ssh.yml

This file was deleted.

0 comments on commit 8be179a

Please sign in to comment.