Skip to content

Commit

Permalink
hehehe
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlehoangson committed Jun 5, 2024
1 parent 80cdff6 commit df768e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ POSTGRES_USER=petclinic
POSTGRES_PASSWORD=petclinic
POSTGRES_DB=petclinic
USER_DOCKERHUB=lehoangson
PATH_PROJECT=project
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
port: 22
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "docker-compose.yml"
target: 'project'
target: ${{ env.PATH_PROJECT }}

- name: Deploy to server
env:
Expand All @@ -75,13 +75,12 @@ jobs:
chmod -R 600 ssh_key
ssh -i ssh_key -o StrictHostKeyChecking=no $USERNAME@$HOST '
mkdir -p project1
cd project1
pwd
mkdir -p ${{ env.PATH_PROJECT }}
'
ssh -i ssh_key -o StrictHostKeyChecking=no $USERNAME@$HOST '
echo ${{ secrets.DOCKER_TOKEN }} | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin &&
cd /project
docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin ${{ secrets.DOCKER_TOKEN }} &&
cd /${{ env.PATH_PROJECT }}
pwd
docker compose pull &&
docker compose up -d --build
Expand Down

0 comments on commit df768e7

Please sign in to comment.