forked from minmatarfleet/minmatar.org
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.26 KB
/
deployment.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
name: deploy to production
on:
push:
branches:
- main
jobs:
build:
name: Deploy to production
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.UBUNTU_HOST }}
username: ${{ secrets.UBUNTU_USERNAME }}
password: ${{ secrets.UBUNTU_PASSWORD }}
script: cd /home/minmatar/minmatar.org && git pull && docker-compose -f docker-compose-prod.yml up -d --build && docker image prune -a -f
notify-discord-failure:
name: Notify Discord Failure
runs-on: ubuntu-latest
needs: build
if: ${{ failure() }}
steps:
- name: Notify Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "New release has failed to deploy! 😢"
notify-discord-success:
name: Notify Discord Success
runs-on: ubuntu-latest
needs: build
if: ${{ success() }}
steps:
- name: Notify Discord Success
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: "New release has been successfully deployed! 🚀"