-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (62 loc) · 2.08 KB
/
Copy pathdeploy.yml
File metadata and controls
70 lines (62 loc) · 2.08 KB
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
61
62
63
64
65
66
67
68
69
70
name: Deploy WordPress — Tema e Plugin via FTP
on:
push:
branches: [main]
jobs:
deploy-tema:
name: Deploy — Tema (site-learninglab)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Instalar lftp
run: sudo apt-get update && sudo apt-get install -y lftp
- name: Sincronizar tema via FTP (lftp mirror)
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
run: |
lftp -c "
set ftp:ssl-allow yes;
set ftp:ssl-force yes;
set ftp:ssl-protect-data yes;
set ssl:verify-certificate no;
set net:reconnect-interval-base 5;
set net:reconnect-interval-multiplier 1;
set net:max-retries 10;
set net:timeout 30;
set ftp:passive-mode yes;
open -u ${FTP_USERNAME},${FTP_PASSWORD} -p 21 ${FTP_SERVER};
mirror --reverse --delete --verbose \
--exclude-glob .git* \
--exclude-glob .DS_Store \
--exclude-glob node_modules/ \
--parallel=2 \
./themes/learninglab-site/ \
./learninglab.com.br/wp-content/themes/site-learninglab/;
bye;
"
deploy-plugin:
name: Deploy — Plugin (learninglab-core)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Sincronizar plugin via FTP
uses: SamKirkland/FTP-Deploy-Action@v4.4.0
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
protocol: ftps
security: loose
port: 21
local-dir: ./plugins/learninglab-core/
server-dir: ./learninglab.com.br/wp-content/plugins/learninglab-core/
exclude: |
**/.git*
**/.git*/**
**/node_modules/**
**/.DS_Store
**/.gitkeep