-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 920 Bytes
/
ci.yml
File metadata and controls
37 lines (32 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build and Deploy
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: automatic_deployment
cancel-in-progress: true
name: Deploy
steps:
- name: Deploy to server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd /var/www/kent-hack-it
echo "Fetching changes from Github"
git fetch
echo "Pulling Changes from Github"
git pull
echo "Building docker"
cd docker
docker compose build
echo "Starting docker"
docker compose up -d --force-recreate