Skip to content

Commit

Permalink
Merge pull request #559 from hngprojects/Rob-in-son-patch-0
Browse files Browse the repository at this point in the history
Update dev.yml
  • Loading branch information
Lanky-23 authored Aug 9, 2024
2 parents 0757d22 + 5eae712 commit df725ab
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
YAML
name: Build, Test, and Deploy for Dev Branch

on:
Expand Down Expand Up @@ -34,13 +35,14 @@ jobs:
- name: Deploy and start on remote server
run: |
sshpass -p ${{ secrets.PASSWORD }} ssh -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@${{ secrets.HOST }} "
cd /var/www/aihomework/dev
git stash
git pull origin dev
docker load -i /tmp/docker-images.tar.gz
docker compose down
docker compose up -d
rm /tmp/docker-images.tar.gz
gunzip /tmp/docker-images.tar.gz
docker load < /tmp/docker-images.tar.gz
cd /var/www/aihomework/dev
git stash
git pull origin dev
docker compose down
docker compose up -d
rm /tmp/docker-images.tar.gz
"
env:
SSH_HOST: ${{ secrets.HOST }}
Expand Down

0 comments on commit df725ab

Please sign in to comment.