add in scp #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Server | |
on: | |
push: | |
branches: | |
- deploytest | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }} | |
- name: Copy over the docker compose file | |
run: | | |
scp -o StrictHostKeyChecking=no compose.prod.yaml [email protected]:guestbook/compose.yaml | |
- name: Deploy code via SSH | |
run: | | |
#DOCKER_HOST="ssh://[email protected]" docker-compose up -d | |
ssh -o StrictHostKeyChecking=no [email protected] "cd guestbook && docker compose up -d" |