-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.77 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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