Market-Frontend/.github/workflows/deploy-backend.yml
Alexander Medvedev b280372eb7 fix: nav
2026-08-27 18:49:20 +02:00

44 lines
1.0 KiB
YAML

name: Deploy React Frontend
on:
push:
branches: [ master ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Spellcheck (typos)
uses: crate-ci/typos@v1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install Dependencies
run: npm install --legacy-peer-deps
- name: Validate i18n Translations
run: npm run check:i18n
- name: Typecheck
run: npm run typecheck
- name: Build Project
run: npm run build
- name: Deploy Static Files to VPS
uses: appleboy/scp-action@v1.0.0
with:
host: ${{ secrets.VPS_IP }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.VPS_PORT }}
source: "dist/*"
target: "/var/www/market/frontend/"
strip_components: 1
overwrite: true