Skip to content

Update deploy.yml

Update deploy.yml #149

Workflow file for this run

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 }}