Skip to content

Instantly share code, notes, and snippets.

@yaapis
Last active September 17, 2021 10:37
Show Gist options
  • Save yaapis/6a1c1dfe4668e6c8b0331b6b7230c7b4 to your computer and use it in GitHub Desktop.
Save yaapis/6a1c1dfe4668e6c8b0331b6b7230c7b4 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml - laravel backend CI
stages:
- build
- deploy
Build:
stage: build
variables:
GIT_STRATEGY: clone
environment:
name: $CI_COMMIT_REF_NAME
script:
- npm i
- npm run dev
artifacts:
paths:
- public/themes
- public/vendor
- public/ckeditor
only:
- dev
- master
- stage
tags:
- node12
Deploy:
stage: deploy
variables:
GIT_STRATEGY: clone
environment:
name: $CI_COMMIT_REF_NAME
script:
- php -v
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- curl -LO https://deployer.org/releases/v6.6.0/deployer.phar
- php deployer.phar deploy $CI_COMMIT_REF_NAME
only:
- dev
- master
- stage
tags:
- shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment