-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (42 loc) · 1.33 KB
/
deploy_prod.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
45
name: Deploy Prod
on:
push:
branches: [ master ]
jobs:
build:
name: ssh/pull/build
runs-on: ubuntu-latest
steps:
- name: Pull code from GitHub
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
eval `ssh-agent -s`
ssh-add ~/.ssh/${{ secrets.SSH_PUBLIC_KEY_NAME }}
cd ${{ secrets.DIST }}
git pull origin master
- name: Clean Install & Build
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
eval `ssh-agent -s`
ssh-add ~/.ssh/${{ secrets.SSH_PUBLIC_KEY_NAME }}
cd ${{ secrets.DIST }}
npm ci
npm run build:prod
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: "Github Monitoring"
DISCORD_AVATAR: "https://i.imgur.com/lPRYnJx.png"
uses: Ilshidur/action-discord@master
with:
args: 'The project {{ EVENT_PAYLOAD.repository.full_name }} has been deployed successfully on https://squadcalc.app'