From 047e3f915a8592789aba4c023c5e31a2d7c127fa Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 28 Dec 2022 17:40:10 +0100 Subject: [PATCH] ci: deploy --- .woodpecker.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index ed3f038..46b6db6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -6,6 +6,8 @@ pipeline: - sleep 20 - mysql -hdb -uroot -proot -e "CREATE DATABASE app" - eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app + when: + branch: [master, master-*, develop, develop-*] config: image: deblan/php:8.1 @@ -13,6 +15,8 @@ pipeline: - echo APP_ENV=prod >> .env.local - echo APP_SECRET=$(openssl rand -hex 32) >> .env.local - echo DATABASE_URL=mysql://root:root@db/app >> .env.local + when: + branch: [master, master-*, develop, develop-*] composer: image: deblan/php:8.1 @@ -26,11 +30,15 @@ pipeline: - PHP=php commands: - ./bin/doctrine-migrate + when: + branch: [master, master-*, develop, develop-*] jsroutes: image: deblan/php:8.1 commands: - php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json + when: + branch: [master, master-*, develop, develop-*] node: image: node:16-slim @@ -40,6 +48,7 @@ pipeline: - cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2 - ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot - yarn + - test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json - npm run build deploy: @@ -58,6 +67,7 @@ pipeline: - sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml - /root/.config/composer/vendor/bin/mage deploy "$CI_BUILD_DEPLOY_TARGET" when: + branch: [master, master-*, develop, develop-*] event: [deployment] services: