forked from gearbot/Dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 2.87 KB
/
geardeployer.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Gear deployer
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Send discord notification
uses: AEnterprise/discord-webhook@master
env:
DATA: '{"embeds": [{"description": "[A new dashboard version is being deployed!]()", "color": 48895, "image": { "url": "https://media1.tenor.com/images/649fcbb487e4fcf5d2a480d72fb79827/tenor.gif"}}]}'
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build
env:
CI: true
API_ROOT: dash.gearbot.rocks
API_SECURE: true
CORS: false
SENTRY_DSN: ${{secrets.SENTRY_DSN}}
- name: Send discord notification
uses: AEnterprise/discord-webhook@master
env:
DATA: '{"content": "Dashboard build failed! Could a <@&581757725332209674> please go yell at whoever broke it? kthx", "embeds": [{"color": 16711680, "image": { "url": "https://media1.tenor.com/images/3015d5e64f4e6199e21b0b7186f96c1d/tenor.gif"}}]}'
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: failure()
- name: deploy to server
uses: AEnterprise/rsync-deploy@v1.0
env:
DEPLOY_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-e -c -r --delete"
SERVER_PORT: ${{ secrets.SERVER_PORT }}
FOLDER: "build/"
SERVER_IP: ${{ secrets.SERVER_IP }}
USERNAME: ${{ secrets.USERNAME }}
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }}
VERSIONCHECK: true
- name: Send discord notification
uses: AEnterprise/discord-webhook@master
env:
DATA: '{"content": "Dashboard deployment failed! Could a <@&581757725332209674> please go yell at whoever broke it? kthx", "embeds": [{"color": 16711680, "image": { "url": "https://media1.tenor.com/images/90b35aec9b1f2549c3c10fcacd2b8e1c/tenor.gif"}}]}'
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: failure()
- name: Purge Cloudflare Cache
uses: jakejarvis/cloudflare-purge-action@v0.1.1
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }}
CLOUDFLARE_KEY: ${{ secrets.CLOUDFLARE_KEY }}
- name: Send discord notification
uses: AEnterprise/discord-webhook@master
env:
DATA: '{"embeds": [{"description": "[A new dashboard version is has been successfully deployed!]()", "color": 65294, "image": { "url": "https://media1.tenor.com/images/77ff54276e951333b7c262f0dfb94930/tenor.gif"}}]}'
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}