Skip to content

add in scp

add in scp #5

Workflow file for this run

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"