-
-
Notifications
You must be signed in to change notification settings - Fork 25
37 lines (31 loc) · 1.02 KB
/
react-admin.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
name: ReactAdmin deploy
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'react-admin'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: VITE_AVORED_FRONTEND_BASE_URL=${{secrets.VITE_AVORED_FRONTEND_BASE_URL}}
VITE_AVORED_FRONTEND_BASE_URL=${{secrets.VITE_AVORED_BACKEND_BASE_URL}} npm ci
- name: Build
run: VITE_AVORED_FRONTEND_BASE_URL=${{secrets.VITE_AVORED_FRONTEND_BASE_URL}}
VITE_AVORED_BACKEND_BASE_URL=${{secrets.VITE_AVORED_BACKEND_BASE_URL}} npm run build
- name: Copy files via ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "./react-admin/dist"
target: ${{ secrets.REACT_TARGET_PATH }}