Skip to content

Add in the deployment #7

Add in the deployment

Add in the deployment #7

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: Set up Docker Compose
run: |
# Install Docker Compose
curl -L "https://github.com/docker/compose/releases/download/v2.19.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
- 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: |
ssh -o StrictHostKeyChecking=no [email protected] "cd guestbook && docker compose up -d"