Skip to content

chore(admin): deploy build folder with rsync #2597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/deploy-alpha-admin-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Admin Web

on:
push:
branches:
- release/alpha
paths:
- ".github/workflows/**"
- "packages/@liexp/core/**"
- "packages/@liexp/shared/**"
- "packages/@liexp/ui/**"
- "services/admin-web/**"

jobs:
deploy-admin-web:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [23.x]

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
hash: ${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Update .env file for Admin Web
run: cp ./services/admin-web/.env.alpha ./services/admin-web/.env

- uses: ./.github/actions/build-packages
with:
hash: ${{ github.sha }}

- name: Build
run: pnpm admin-web build:app

- name: Deploy on Server
uses: burnett01/rsync-deployments@7.0.2
with:
switches: -arP
path: services/admin-web/build/
remote_path: ${{ secrets.ADMIN_WEB_DEPLOY_PATH }}
remote_host: ${{ secrets.ADMIN_WEB_DEPLOY_HOST }}
remote_user: ${{ secrets.ADMIN_WEB_DEPLOY_USER }}
remote_key: ${{ secrets.ADMIN_WEB_DEPLOY_KEY }}
4 changes: 2 additions & 2 deletions scripts/deploy.admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ pnpm admin-web build:app

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

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

pnpm admin-web clean
pnpm admin-web clean
3 changes: 1 addition & 2 deletions services/admin-web/.env.alpha
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
PORT=4001
VITE_NODE_ENV=production

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

# Open AI
VITE_OPENAI_URL=http://localai.lies.exposed/v1
VITE_OPENAI_URL=http://localai.lies.exposed/v1
Loading