All checks were successful
Deploy / Deploy to Production (push) Successful in 10s
Passer USERNAME/PASSWORD via -u sur la ligne de commande shell plutôt que dans un fichier script lftp, pour éviter que les caractères spéciaux soient interprétés comme des commandes lftp. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
798 B
YAML
26 lines
798 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy to Production
|
|
runs-on: docker
|
|
container:
|
|
image: forgejo-ci-php:latest
|
|
steps:
|
|
- name: Checkout code
|
|
run: |
|
|
git clone --depth 1 --branch main https://oauth2:${{ github.token }}@forge.studio-variable.com/${{ github.repository }}.git .
|
|
|
|
- name: Deploy via FTP
|
|
env:
|
|
USERNAME: ${{ secrets.USERNAME }}
|
|
PASSWORD: ${{ secrets.PASSWORD }}
|
|
HOST: ${{ secrets.HOST }}
|
|
run: |
|
|
apt-get update -qq && apt-get install -y -qq lftp
|
|
lftp -u "$USERNAME,$PASSWORD" "$HOST" -e "set ftp:ssl-allow no; mirror --reverse --verbose --ignore-time --parallel=10 -x cache/ -x .git/ -x .forgejo/ -x .claude/ -x backup/ . .; quit"
|