kind: pipeline type: docker name: deploy-static-site steps: - name: deploy public_html image: alpine:3.20 volumes: - name: ididit path: /var/www/ididit commands: - | if [ -d public_html ] && [ "$(ls -A public_html)" ]; then target="/var/www/ididit/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}" echo "Déploiement vers $target" rm -rf "$target" mkdir -p "$target" cp -r public_html/* "$target/" echo "Déploiement terminé." echo "https://ididit.bymycode.com/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}" ls -alh "$target" else echo "Aucun dossier public_html à déployer." fi when: branch: - main event: - push volumes: - name: ididit host: path: /var/www/ididit