-
-
Notifications
You must be signed in to change notification settings - Fork 61
111 lines (94 loc) · 3.08 KB
/
client.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Client CI/CD
on:
push:
branches:
- "main"
paths:
- "client/**"
- "common/**"
pull_request:
branches:
- "main"
paths:
- "server/**"
- "common/**"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.20.0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install dependencies
run: pnpm --filter tachi-client... --filter . install
- name: Lint
run: pnpm --filter tachi-client lint
- name: Typecheck
run: pnpm --filter tachi-client typecheck
deploy:
runs-on: [ubuntu-latest]
needs: test
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.20.0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Enable SSH Key
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
- name: Install dependencies
run: pnpm --filter tachi-client... --filter . install
- name: Build Bokutachi
run: pnpm --filter tachi-client build
env:
VITE_GIT_REPO: "GitHub:zkldi/Tachi"
VITE_TCHIC_MODE: "boku"
VITE_GOATCOUNTER: "https://tachi.goatcounter.com/count"
VITE_RECAPTCHA_KEY: "6LcsYbIpAAAAAEJffjIXmbQcxj_SBZG7BnSPjF4L"
VITE_SERVER_URL: "https://boku.tachi.ac"
VITE_DISCORD: "https://discord.gg/E4n8ZZF5ES"
VITE_CDN_URL: "https://cdn-boku.tachi.ac"
TACHI_NAME: "Bokutachi"
BUILD_OUT_DIR: /home/runner/boku
- name: Build Kamaitachi
run: pnpm --filter tachi-client build
env:
VITE_MANDATE_LOGIN: true
VITE_GOATCOUNTER: "https://tachi.goatcounter.com/count"
VITE_SERVER_URL: "https://kamai.tachi.ac"
VITE_EAG_CLIENT_ID: "C341A6CA3E72D48F0B20E84C045D15BFACD88E0A"
VITE_FLO_CLIENT_ID: "F0C0F66355B954F5DB5472AE21C59295403D60CC"
VITE_DISCORD: "https://discord.gg/NNgGJbpQUj"
VITE_TCHIC_MODE: "kamai"
VITE_CDN_URL: "https://cdn-kamai.tachi.ac"
VITE_GIT_REPO: "GitHub:zkldi/Tachi"
VITE_RECAPTCHA_KEY: "6LcsYbIpAAAAAEJffjIXmbQcxj_SBZG7BnSPjF4L"
TACHI_NAME: "Kamaitachi"
BUILD_OUT_DIR: /home/runner/kamai
- name: Deploy Kamaitachi
run: scp -r ~/kamai ci@"$TACHI_HOST":tachi-client
env:
TACHI_HOST: ${{secrets.TACHI_HOST}}
- name: Deploy Bokutachi
run: scp -r ~/boku ci@"$TACHI_HOST":tachi-client
env:
TACHI_HOST: ${{secrets.TACHI_HOST}}