Skip to content

Update FTP deployment workflow to copy all files from client and serv… #9

Update FTP deployment workflow to copy all files from client and serv…

Update FTP deployment workflow to copy all files from client and serv… #9

Workflow file for this run

name: Build and Deploy to FTP
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install server dependencies
run: cd server && npm install
- name: Install client dependencies
run: cd client && npm install
- name: Build client
run: cd client && npm run build
- name: Prepare upload directory
run: |
mkdir -p upload
cp -r client/build/* upload/
cp -r server/* upload/
- name: Start server
run: nohup npm run start &
- name: Upload to FTP server
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
dangerous-clean-slate: true
local-dir: ./upload/
server-dir: /