Skip to content

Merge pull request #267 from avored/228-asset-manager-support-of-folder #4

Merge pull request #267 from avored/228-asset-manager-support-of-folder

Merge pull request #267 from avored/228-asset-manager-support-of-folder #4

name: Frontend deploy
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'react-front'
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: 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}}
VITE_AVORED_CMS_TOKEN=${{secrets.VITE_AVORED_CMS_TOKEN}} 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-front/dist"
target: ${{ secrets.REACT_TARGET_PATH }}