Skip to content

Re-add(?) the deploy script #2

Re-add(?) the deploy script

Re-add(?) the deploy script #2

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main # Change to your main branch name if different
jobs:
build:
runs-on: ubuntu-latest # We will continue to use a standard Ubuntu runner
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18' # Specify your Node.js version
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build # Replace with your actual build command
- name: Generate filelist.txt
run: |
# Create filelist.txt with all files in the build directory
find build -type f > filelist.txt
cat filelist.txt # This prints out the contents of the file to the logs for verification
- name: Upload files via FTPES using filelist.txt
env:
FTPES_HOST: ${{ secrets.FTPES_HOST }}
FTPES_USERNAME: ${{ secrets.FTPES_USERNAME }}
FTPES_PASSWORD: ${{ secrets.FTPES_PASSWORD }}
run: |
# Upload files listed in filelist.txt using curl
curl -T "$(cat filelist.txt)" --ftp-ssl-reqd --user $FTPES_USERNAME:$FTPES_PASSWORD ftp://$FTPES_HOST:2100/path/to/deploy/