-
Notifications
You must be signed in to change notification settings - Fork 0
23 lines (23 loc) · 934 Bytes
/
FTPS.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: 🚀 FTPS Deploy
on: [push, workflow_dispatch]
#on: [push]
jobs:
ftps-deploy:
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: 📦 Get LFTP
run: sudo apt install lftp
- name: 🛠️ Configure LFTP
run: |
mkdir ~/.lftp
sudo apt update
sudo apt upgrade
sudo dpkg-reconfigure ca-certificates
echo "set ssl:ca-file ~/.lftp/certs.crt;set ssl:check-hostname no;" >> ~/.lftp/rc
echo "${{ secrets.FTP_CERTS_BASE64 }}" | base64 --decode > ~/.lftp/certs.crt
- name: 🔑 Load Secrets
run: echo "machine ${{ secrets.FTP_HOSTNAME }} login ${{ secrets.FTP_USERNAME }} password ${{ secrets.FTP_PASSWORD }}" > ~/.netrc
- name: 📁 Upload Folder
run: lftp -e "mirror --parallel=100 -R ./ ${{ secrets.FTP_TARGETDIR }}" ${{ secrets.FTP_HOSTNAME }}