Füge Workflow für FTP-Deployment hinzu
All checks were successful
Deploy via FTP / deploy (push) Successful in 3s
All checks were successful
Deploy via FTP / deploy (push) Successful in 3s
This commit is contained in:
52
.github/workflows/deploy.yml
vendored
Normal file
52
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Deploy via FTP
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: shell
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install LFTP (falls nicht vorhanden)
|
||||
run: |
|
||||
if ! command -v lftp >/dev/null 2>&1; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y lftp
|
||||
fi
|
||||
|
||||
- name: Upload via FTPS
|
||||
env:
|
||||
FTP_HOST: ${{ secrets.FTP_SERVER }}
|
||||
FTP_USER: ${{ secrets.FTP_USER }}
|
||||
FTP_PASS: ${{ secrets.FTP_PASS }}
|
||||
FTP_PORT: ${{ secrets.FTP_PORT }}
|
||||
FTP_DIR: ${{ secrets.FTP_DIR }}
|
||||
run: |
|
||||
lftp -u "$FTP_USER","$FTP_PASS" -p "$FTP_PORT" "$FTP_HOST" <<LFTP_CMDS
|
||||
set ssl:verify-certificate no
|
||||
set ftp:ssl-force true
|
||||
set ftp:ssl-protect-data true
|
||||
set net:max-retries 5
|
||||
set net:timeout 20
|
||||
mirror -R ./ "$FTP_DIR" \
|
||||
--verbose \
|
||||
--parallel=6 \
|
||||
--delete \
|
||||
--exclude .git/ \
|
||||
--exclude .gitea/ \
|
||||
--exclude .github/ \
|
||||
--exclude uploads/ \
|
||||
--exclude .claude/ \
|
||||
--exclude .env \
|
||||
--exclude-glob *.csv \
|
||||
--exclude-glob *.sql \
|
||||
--exclude-glob *.md
|
||||
bye
|
||||
LFTP_CMDS
|
||||
Reference in New Issue
Block a user