Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Almor21 authored Sep 15, 2024
1 parent 0af7ad3 commit b8930d5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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

0 comments on commit b8930d5

Please sign in to comment.