Skip to content

Commit

Permalink
feat: cd
Browse files Browse the repository at this point in the history
  • Loading branch information
a2cd committed Jan 11, 2024
1 parent 9d7dd7e commit 8baa3d6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ jobs:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "SSH_PRIVATE_KEY" > ~/.ssh/a2cd.key
chmod 600 ~/.ssh/a2cd.key
cat > ~/.ssh/config <<END
mkdir -p ~/.ssh/ && echo "$SSH_PRIVATE_KEY" > ~/.ssh/a2cd.key
cat >> ~/.ssh/config <<END
Host a2cd
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/a2cd.key
StrictHostKeyChecking no
END
- name: Deploy
run: ssh a2cd 'cd /usr/local/repo/rs-hello-world/ && docker-compose pull && docker-compose -f docker-compose.yml up -d'
run: ssh a2cd 'cd /usr/local/repo/rs-hello-world/ && docker-compose pull && docker-compose up -d'

0 comments on commit 8baa3d6

Please sign in to comment.