Skip to content

Commit

Permalink
fix: redirect deployment stdout to log file
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixidream committed Apr 22, 2024
1 parent a94a57e commit 81340a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Execute Script on Server
- name: pull release branch and rebuild / restart container
run: |
ssh -o "StrictHostKeyChecking=no" -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'bash -s' < "./scripts/deploy.sh"
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
LOG_FILE="deployment_${TIMESTAMP}.txt"
ssh -o "StrictHostKeyChecking=no" -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'bash -s' < ./scripts/deploy.sh | tee "/home/pixi/creamrobotics_deploy_logs/$LOG_FILE"

0 comments on commit 81340a2

Please sign in to comment.