Skip to content

Create main.yml

Create main.yml #55

Workflow file for this run

name: Deploy to Server
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Execute deploy script on EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
port: 22
script: |
cd ~/STUDIO-EYE-WEB-PROMOTION
git pull origin main
sudo systemctl restart nginx