Skip to content

fix command

fix command #7

Workflow file for this run

name: CI/CD pipeline learning
on:
push:
branches:
- withDocker
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Setup SSH
uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << EOF
cd app
git pull
sudo docker compose build --no-cache
sudo docker compose down
sudo docker compose up -d
EOF