|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: "Deploy on maxou.dev"
|
|
|
|
|
name: "CI and Deploy on maxou.dev"
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
- name: server
|
|
|
|
@ -11,11 +11,26 @@ trigger:
|
|
|
|
|
- push
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
|
|
- image: node:latest
|
|
|
|
|
name: "front CI"
|
|
|
|
|
commands:
|
|
|
|
|
- npm install
|
|
|
|
|
- npm run tsc
|
|
|
|
|
|
|
|
|
|
- image: composer:latest
|
|
|
|
|
name: "php CI"
|
|
|
|
|
commands:
|
|
|
|
|
- composer install && composer update
|
|
|
|
|
- vendor/bin/phpstan analyze
|
|
|
|
|
|
|
|
|
|
- image: node:latest
|
|
|
|
|
name: "build node"
|
|
|
|
|
volumes: &outputs
|
|
|
|
|
- name: server
|
|
|
|
|
path: /outputs
|
|
|
|
|
depends_on:
|
|
|
|
|
- "front CI"
|
|
|
|
|
commands:
|
|
|
|
|
- curl -L moshell.dev/setup.sh > /tmp/moshell_setup.sh
|
|
|
|
|
- chmod +x /tmp/moshell_setup.sh
|
|
|
|
@ -24,14 +39,15 @@ steps:
|
|
|
|
|
-
|
|
|
|
|
- /root/.local/bin/moshell ci/build_react.msh
|
|
|
|
|
|
|
|
|
|
- image: composer:latest
|
|
|
|
|
- image: ubuntu:latest
|
|
|
|
|
name: "prepare php"
|
|
|
|
|
volumes: *outputs
|
|
|
|
|
depends_on:
|
|
|
|
|
- "php CI"
|
|
|
|
|
commands:
|
|
|
|
|
- mkdir -p /outputs/public
|
|
|
|
|
# this sed command will replace the included `profile/dev-config-profile.php` to `profile/prod-config-file.php` in the config.php file.
|
|
|
|
|
- sed -iE 's/\\/\\*PROFILE_FILE\\*\\/\\s*".*"/"profiles\\/prod-config-profile.php"/' config.php
|
|
|
|
|
- composer install && composer update
|
|
|
|
|
- rm profiles/dev-config-profile.php
|
|
|
|
|
- mv src config.php sql profiles vendor /outputs/
|
|
|
|
|
|
|
|
|
|