Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
centauridesigns authored Nov 22, 2024
1 parent cd3692e commit 0864de6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ jobs:
chmod 600 ~/.ssh/id_ed25519 # This should be redundant but seems to do the trick.
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Correct file permissions
run: sudo chown -R $USER:$USER .

- name: Connect, pull, build and deploy
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout ${{ secrets.MAIN_BRANCH }} && git pull && docker compose down && docker compose up -d --build && exit"
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && sudo chown -R $USER:$USER . && git checkout ${{ secrets.MAIN_BRANCH }} && git pull && docker compose down && docker compose up -d --build && exit"

- name: Clean up
run: rm -rf ~/.ssh

0 comments on commit 0864de6

Please sign in to comment.