-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.04 KB
/
ci.yml
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
38
39
40
41
42
43
44
name: Build and Push image
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Log in to the Container registry
uses: docker/login-action@master
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@master
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/gumo:latest
- name: Deploy new image
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: |
docker compose --file ${{ secrets.DOCKER_COMPOSE_FILE }} down --rmi all gumo
docker compose --file ${{ secrets.DOCKER_COMPOSE_FILE }} up -d --force-recreate gumo