Skip to content

Commit 505a44d

Browse files
committed
chore(admin): deploy build folder with rsync
1 parent 1b911e4 commit 505a44d

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy Admin Web
2+
3+
on:
4+
push:
5+
branches:
6+
- release/alpha
7+
paths:
8+
- ".github/workflows/**"
9+
- "packages/@liexp/core/**"
10+
- "packages/@liexp/shared/**"
11+
- "packages/@liexp/ui/**"
12+
- "services/admin-web/**"
13+
14+
jobs:
15+
deploy-admin-web:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node-version: [23.x]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: ./.github/actions/install-deps
24+
with:
25+
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}
26+
27+
- name: Update .env file for Admin Web
28+
run: cp ./services/admin-web/.env.alpha ./services/admin-web/.env
29+
30+
- uses: ./.github/actions/build-packages
31+
with:
32+
hash: ${{ github.sha }}
33+
34+
- name: Build
35+
run: pnpm admin-web build:app
36+
37+
- name: Deploy on Server
38+
uses: burnett01/rsync-deployments@7.0.2
39+
with:
40+
switches: -arP
41+
path: services/admin-web/build/
42+
remote_path: ${{ secrets.ADMIN_WEB_DEPLOY_PATH }}
43+
remote_host: ${{ secrets.ADMIN_WEB_DEPLOY_HOST }}
44+
remote_user: ${{ secrets.ADMIN_WEB_DEPLOY_USER }}
45+
remote_key: ${{ secrets.ADMIN_WEB_DEPLOY_KEY }}

scripts/deploy.admin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ pnpm admin-web build:app
1515

1616
ssh "$HOST" "rm -rf /var/www/html/${HOST}/admin-web"
1717

18-
rsync -aP ./services/admin-web/build/ "$HOST":/var/www/html/"${HOST}"/admin
18+
rsync -arP ./services/admin-web/build/ "$HOST":/var/www/html/"${HOST}"/admin
1919

20-
pnpm admin-web clean
20+
pnpm admin-web clean

services/admin-web/.env.alpha

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
PORT=4001
21
VITE_NODE_ENV=production
32

43
VITE_DEBUG=@liexp:*:error
@@ -8,4 +7,4 @@ VITE_API_URL=https://alpha.api.lies.exposed/v1
87
VITE_WEB_URL=https://alpha.lies.exposed
98

109
# Open AI
11-
VITE_OPENAI_URL=http://localai.lies.exposed/v1
10+
VITE_OPENAI_URL=http://localai.lies.exposed/v1

0 commit comments

Comments
 (0)