ci: add base of deploy

This commit is contained in:
Simon Vieille 2022-12-28 13:44:31 +01:00
parent 131563fa24
commit 013ad4b32d
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -35,6 +35,24 @@ pipeline:
- yarn
- npm run build
deploy:
image: deblan/php:8.1
secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
commands:
- mkdir "$HOME/.ssh"
- echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519"
- chmod 700 "$HOME/.ssh"
- chmod 600 "$HOME/.ssh/id_ed25519"
- composer global require andres-montanez/magallanes
- cp .mage.yml.dist .mage.yml
- sed -i "s/{ssh_user}/$SSH_USER/g" .mage.yml
- sed -i "s/{ssh_host}/$SSH_HOST/g" .mage.yml
- sed -i "s/{app_directory}/$APP_DIRECTORY/g" .mage.yml
- cat .mage.yaml
# - /root/.config/composer/vendor/bin/mage
# when:
# event: [deploy]
services:
db:
image: mariadb:10.3