-
Notifications
You must be signed in to change notification settings - Fork 19
48 lines (41 loc) · 1006 Bytes
/
main.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
name: KG Test/Deploy Code
on:
push:
branches:
- master
- dev/alpha
- dev/beta
pull_request:
branches:
- master
- dev/alpha
- dev/beta
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: NodeJS setup
uses: actions/setup-node@v4
with:
node-version: 20
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: build
steps:
- name: Executing remote SSH commands using password
uses: appleboy/[email protected]
with:
username: ${{ secrets.KG_SSH_USER }}
host: ${{ secrets.KG_SSH_HOST }}
key: ${{ secrets.KG_SSH_KEY }}
script: /var/www/kittensgame.com/html/deploy.sh