-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.19 KB
/
ci.yaml
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
name: Deployment
on:
push:
# branches: ['main']
branches: []
jobs:
deploy:
runs-on: self-hosted
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
with:
clean: false
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml' # Needed to use multiple directories
- name: Setup CMS
run: |
touch .env
echo "${{ secrets.CMS_ENV }}" | base64 --decode > .env
pnpm install
pnpm build
working-directory: ./server
- name: Setup Client
run: |
touch .env
echo "${{ secrets.CLIENT_ENV }}" | base64 --decode > .env
pnpm install
pnpm build
working-directory: ./client
- name: Restart PM2
run: |
touch pm2.config.js
echo "${{ secrets.PM2_CONFIG }}" | base64 --decode > pm2.config.js
pm2 restart pm2.config.js