63 lines
1.9 KiB
YAML
63 lines
1.9 KiB
YAML
stages:
|
|
- deploy
|
|
|
|
# -------------------------
|
|
# Staging: Dateien hochladen
|
|
# -------------------------
|
|
deploy:staging:
|
|
stage: deploy
|
|
image: alpine:3.20
|
|
before_script:
|
|
- echo "📡 Installing lftp..."
|
|
- apk add --no-cache lftp
|
|
- echo "📂 Dateien im CI-Workspace:"
|
|
- pwd
|
|
- ls -la
|
|
script:
|
|
- echo "🚀 Deploy (staging) via FTPS to ${FTP_HOST}:${FTP_PATH_STAGING} ..."
|
|
- lftp -u "${FTP_USER}","${FTP_PASSWORD}" "${FTP_HOST}" -e "set ftp:ssl-force true; set ftp:passive-mode true; set ftp:ssl-protect-data true; set ssl:verify-certificate no; mirror -R --delete \
|
|
--exclude .git \
|
|
--exclude .gitlab-ci.yml \
|
|
--exclude node_modules \
|
|
--exclude .vscode \
|
|
--exclude .DS_Store \
|
|
--exclude README.md \
|
|
./ ${FTP_PATH_STAGING}; bye"
|
|
- echo "✅ Deploy finished (staging)."
|
|
environment:
|
|
name: staging
|
|
url: https://staging.usbcheck.it
|
|
only:
|
|
- develop
|
|
- merge_requests
|
|
|
|
# -------------------------
|
|
# Production: Dateien hochladen
|
|
# -------------------------
|
|
deploy:production:
|
|
stage: deploy
|
|
image: alpine:3.20
|
|
before_script:
|
|
- echo "📡 Installing lftp..."
|
|
- apk add --no-cache lftp
|
|
- echo "📂 Dateien im CI-Workspace:"
|
|
- pwd
|
|
- ls -la
|
|
script:
|
|
- echo "🚀 Deploy (production) via FTPS to ${FTP_HOST}:${FTP_PATH_PROD} ..."
|
|
- lftp -u "${FTP_USER}","${FTP_PASSWORD}" "${FTP_HOST}" -e "set ftp:ssl-force true; set ftp:passive-mode true; set ftp:ssl-protect-data true; set ssl:verify-certificate no; mirror -R --delete \
|
|
--exclude .git \
|
|
--exclude .gitlab-ci.yml \
|
|
--exclude node_modules \
|
|
--exclude .vscode \
|
|
--exclude .DS_Store \
|
|
--exclude README.md \
|
|
./ ${FTP_PATH_PROD}; bye"
|
|
- echo "✅ Deploy finished (production)."
|
|
environment:
|
|
name: production
|
|
url: https://www.usbcheck.it
|
|
only:
|
|
- main
|
|
when: manual
|