Update FTP deployment workflow to specify trailing slash in local dir… #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: npm install | |
- name: Install client dependencies | |
run: cd client && npm install | |
- name: Build client | |
run: cd client && npm run build | |
- name: Start server | |
run: nohup npm run start & | |
- name: Upload to FTP server | |
uses: SamKirkland/[email protected] | |
with: | |
server: ftp://youtubdle.com | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: dist/ | |
server-dir: / |