Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Deploy Server
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
cd /home/proyecto/VlsmCalculator/
git pull origin main
git status
docker stop vlsmcalculator-app
docker rm vlsmcalculator-app
docker build -t vlsmcalculator .
docker run -dit -p 5018:80 --restart unless-stopped --name vlsmcalculator-app vlsmcalculator