Skip to content

Commit

Permalink
embed APP_DIR directly in command
Browse files Browse the repository at this point in the history
  • Loading branch information
rajkumaar23 committed Dec 24, 2023
1 parent 9669991 commit d346420
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,18 @@ jobs:
User $SSH_USER
IdentityFile ~/.ssh/priv.key
StrictHostKeyChecking no
SetEnv APP_DIR=$APP_DIR
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}
APP_DIR: ${{ secrets.APP_DIR }}

- name: Stop the containers
run: ssh -t pi 'cd $APP_DIR && docker compose down'
run: ssh -t pi 'cd ${{ secrets.APP_DIR }} && docker compose down'

- name: Update the images
run: ssh -t pi 'cd $APP_DIR && docker compose pull'
run: ssh -t pi 'cd ${{ secrets.APP_DIR }} && docker compose pull'

- name: Restart the containers
run: ssh -t pi 'cd $APP_DIR && docker compose up -d --remove-orphans'
run: ssh -t pi 'cd ${{ secrets.APP_DIR }} && docker compose up -d --remove-orphans'

0 comments on commit d346420

Please sign in to comment.