edit of main.yml #29
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: Deploy to SFTP | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Deploy Backend via SFTP | |
env: | |
FTP_USERNAME: ${{ secrets.FTP_USERNAME }} | |
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} | |
run: | | |
apt-get update | |
apt-get install -y lftp | |
lftp -e "set ssl:verify-certificate no; open -u $FTP_USERNAME,$FTP_PASSWORD 287586.w86.wedos.net && mirror -R Fitmo_backend /www/subdom/beTest" | |
deploy-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Navigate to frontend directory | |
run: cd Fitmo_frontend # Adjust this to your frontend directory path | |
- name: Install dependencies and build Frontend | |
run: | | |
npm install | |
npm run build # Adjust this based on your actual build command | |
- name: Deploy Frontend via SFTP | |
env: | |
FTP_USERNAME: ${{ secrets.FTP_USERNAME }} | |
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} | |
run: | | |
apt-get update | |
apt-get install -y lftp | |
cd dist # Navigate to the build output directory | |
lftp -e "set ssl:verify-certificate no; open -u $FTP_USERNAME,$FTP_PASSWORD 287586.w86.wedos.net && mirror -R . /www/subdom/devTest" |