mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
image: php:7.2
|
|
|
|
cache:
|
|
paths:
|
|
- vendor/
|
|
|
|
before_script:
|
|
- apt-get update -qq && apt-get install -y -qq sshpass
|
|
- apt-get install zip unzip
|
|
- apt-get install git -yqq
|
|
- curl -sS https://getcomposer.org/installer | php
|
|
- php composer.phar install
|
|
- mv composer.phar /usr/local/bin/composer
|
|
|
|
deploy_stage:
|
|
stage: deploy
|
|
environment: Staging
|
|
only:
|
|
- master
|
|
script:
|
|
- sshpass -V
|
|
- export SSHPASS=$USER_PASS
|
|
- chmod -R 777 storage
|
|
- chmod -R 777 bootstrap
|
|
- composer update
|
|
- sshpass -e scp -o stricthostkeychecking=no -r . admin@54.39.97.124:/var/www/website/C697
|
|
- sshpass -e ssh -t admin@54.39.97.124 "cd /var/www/website/C697 && php artisan migrate"
|
|
|
|
deploy_production:
|
|
stage: deploy
|
|
environment: Production
|
|
only:
|
|
- tags
|
|
script:
|
|
- sshpass -V
|
|
- export SSHPASS=$USER_PASS
|
|
- chmod -R 777 storage
|
|
- chmod -R 777 bootstrap
|
|
- composer update
|
|
- sshpass -e scp -o stricthostkeychecking=no -r . admin@54.39.97.124:/var/www/website/C697
|
|
- sshpass -e ssh -t admin@54.39.97.124 "cd /var/www/website/C697 && php artisan migrate"
|