Skip to content

Commit

Permalink
ci: fix copy env
Browse files Browse the repository at this point in the history
  • Loading branch information
javascriptizer1 committed Feb 3, 2025
1 parent fe3b530 commit eadaed0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/gymnote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ jobs:
echo "REDIS_PASSWORD=${{ vars.REDIS_PASSWORD }}" >> .env
echo "REDIS_DB=${{ vars.REDIS_DB }}" >> .env
- name: Copy .env file to VPS
- name: Set up SSH Key
run: |
echo "$VPS_SSH_KEY" > deploy_key.pem
echo "$VPS_SSH_KEY"
echo "${{ secrets.VPS_SSH_KEY }}" > deploy_key.pem
chmod 600 deploy_key.pem
- name: Copy .env file to VPS
run: |
ssh -i deploy_key.pem -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST "mkdir -p /home/$VPS_USER/apps/gymnote/"
scp -i deploy_key.pem -o StrictHostKeyChecking=no -r .env $VPS_USER@$VPS_HOST:/home/$VPS_USER/apps/gymnote/.env
ssh -i deploy_key.pem -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST "sudo mv /home/$VPS_USER/apps/gymnote/.env /root/apps/gymnote/.env && sudo chmod 600 /root/apps/gymnote/.env"
Expand Down

0 comments on commit eadaed0

Please sign in to comment.