Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
code28 committed Jun 26, 2024
1 parent 851546f commit 51f09be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
User $SSH_USER
IdentityFile ~/.ssh/sshkey.key
StrictHostKeyChecking no
SendEnv TARGET_DIR
END
env:
SSH_USER: ${{ inputs.production == true && secrets.PRODUCTION_SSH_USER || secrets.STAGING_SSH_USER }}
Expand All @@ -40,9 +39,9 @@ jobs:

- name: Run deploy commands on remote server
run: |
ssh sshhost 'echo "target dir 1: $TARGET_DIR"'
ssh sshhost 'echo "target dir 1: ${{ inputs.production == true && 'WalletServer-production' || 'WalletServer-staging' }}"'
ssh sshhost TARGET_DIR=$TARGET_DIR 'echo "target dir 2: $TARGET_DIR"'
ssh sshhost TARGET_DIR=$TARGET_DIR 'cd "$TARGET_DIR" && pwd'
ssh sshhost 'cd "$TARGET_DIR" && pwd'
ssh sshhost 'cd $TARGET_DIR && git fetch && git checkout main && git pull && bash check_env.sh && docker compose up -d --no-deps --build backend'
ssh sshhost 'df . | awk "NR==2{if(\$4<=20*1024*1024) { system(\"docker system prune -f\") } else { system(\"echo \\\"Enough space left. No need to prune docker.\\\"\") } }"'
env:
Expand Down

0 comments on commit 51f09be

Please sign in to comment.