Skip to content

fix of main.yml

fix of main.yml #19

Workflow file for this run

name: Deploy to FTP
on:
push:
branches:
- master # Change this to your main branch name
jobs:
deploy_frontend:
runs-on: windows-latest # Specify Windows environment
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies and build Vue.js frontend
run: |
cd Fitmo_frontend
npm install # Use npm instead of pnpm if you're not using pnpm
npm run build
- name: Deploy Vue.js frontend to FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: Fitmo_frontend/dist
remote-dir: www/subdoms/devTest
deploy_backend:
runs-on: windows-latest # Specify Windows environment
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
- name: Install Composer dependencies
run: |
cd Fitmo_backend
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
php composer.phar install --no-dev --optimize-autoloader
- name: Deploy Laravel backend to FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: Fitmo_backend
exclude: ".env,.git"
remote-dir: www/subdoms/beTest