-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 1.03 KB
/
front-deploy.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
name: Deploy to FTP
on:
push:
branches:
- master
paths:
- 'front/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install project dependencies
run: npm install
working-directory: ./front
- name: Build Angular
run: ng build --configuration production
working-directory: ./front
- name: Install lftp
run: sudo apt-get install -y lftp
- name: Deploy to FTP
run: |
lftp -e "set ftp:ssl-allow no; set mirror:use-pget-n 5; mirror --reverse --delete --verbose=3 --no-perms --exclude .well-known/ --exclude web.config ./dist/flying-pad/browser /${{ secrets.FTP_DIR }}; bye" ftp://${{ secrets.FTP_HOST }} -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASS }}
working-directory: ./front