Compare commits
2 Commits
91549f1a05
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b67a3a94a | |||
| c7c5543fb6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,3 +22,4 @@
|
|||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
gitlab-ci.yml
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
image: nebulaed/php83-node22:latest
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- preparation
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
variables:
|
|
||||||
DEPLOY_PATH: /var/www/roxane
|
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
|
||||||
NODE_ENV: production
|
|
||||||
|
|
||||||
# Dependencies installation
|
|
||||||
prepare:
|
|
||||||
stage: preparation
|
|
||||||
before_script:
|
|
||||||
- apt-get update -y
|
|
||||||
- apt-get install -y php8.3 php8.3-cli php8.3-mbstring php8.3-xml php8.3-bcmath php8.3-curl unzip git curl mariadb-client
|
|
||||||
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
|
||||||
script:
|
|
||||||
- php -v
|
|
||||||
- composer -V
|
|
||||||
- node -v
|
|
||||||
- npm ci
|
|
||||||
- composer install --no-dev --no-interaction --prefer-dist
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- vendor/
|
|
||||||
- node_modules/
|
|
||||||
expire_in: 1h
|
|
||||||
|
|
||||||
# Front compilation with vite
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- npm run build
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- public/build/
|
|
||||||
- public/assets/
|
|
||||||
- public/css/
|
|
||||||
- public/js/
|
|
||||||
- public/images/
|
|
||||||
expire_in: 1h
|
|
||||||
|
|
||||||
# Tests Laravel
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- php artisan test --without-tty
|
|
||||||
|
|
||||||
# Deploy
|
|
||||||
deploy:
|
|
||||||
stage: deploy
|
|
||||||
rules:
|
|
||||||
- if: '$CI_COMMIT_REF_NAME == "release" || $CI_COMMIT_REF_NAME == "master"'
|
|
||||||
before_script:
|
|
||||||
- apt-get update -y && apt-get install -y ssh
|
|
||||||
- mkdir -p ~/.ssh
|
|
||||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
|
||||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
|
||||||
script:
|
|
||||||
- composer global require deployer/deployer
|
|
||||||
- ~/.composer/vendor/bin/dep deploy -vvv
|
|
||||||
# Laravel pint ?
|
|
||||||
Reference in New Issue
Block a user