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 0290360 commit 9d7dd7e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "SSH_PRIVATE_KEY" > ~/.ssh/staging.key
chmod 600 ~/.ssh/staging.key
echo "SSH_PRIVATE_KEY" > ~/.ssh/a2cd.key
chmod 600 ~/.ssh/a2cd.key
cat > ~/.ssh/config <<END
Host staging
Host a2cd
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/staging.key
IdentityFile ~/.ssh/a2cd.key
StrictHostKeyChecking no
END
- name: Update container
run: ssh staging 'cd /usr/local/repo/rs-hello-world/ && docker-compose pull && docker-compose -f docker-compose.yml up -d'
- name: Deploy
run: ssh a2cd 'cd /usr/local/repo/rs-hello-world/ && docker-compose pull && docker-compose -f docker-compose.yml up -d'

0 comments on commit 9d7dd7e

Please sign in to comment.