tetris/.drone.yml
supercodeur 8a5ba1c541
All checks were successful
continuous-integration/drone Build is passing
[feat] Initial commit
2025-06-29 20:05:44 +02:00

35 lines
846 B
YAML

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