-
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (48 loc) · 1.73 KB
/
build.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
name: 'Build and Deploy'
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build-and-deploy-client:
name: Build and Deploy /client
if: "${{ github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(build/client): trigger build action') }}"
runs-on: ubuntu-latest
steps:
- name: Connect to SSH and run commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
./build-client.sh
build-and-deploy-server:
name: Build and Deploy /server
if: "${{ github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(build/server): trigger build action') }}"
runs-on: ubuntu-latest
steps:
- name: Connect to SSH and run commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
./build-server.sh
build-and-deploy-docs:
name: Build and Deploy /docs
if: "${{ github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(build/docs): trigger build action') }}"
runs-on: ubuntu-latest
steps:
- name: Connect to SSH and run commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
./build-docs.sh