notes/.gitlab-ci.yml

45 lines
735 B
YAML

stages:
- build
- test
- deploy
build:
image: node:slim
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm
- .cache
before_script:
- npm ci --cache .npm --prefer-offline
script:
- npm run build
artifacts:
name: "$CI_JOB_ID"
paths:
- ./public
expire_in: 30 mins
prettier:
image: node:slim
stage: test
script:
- npm run prettier
deploy:
image: dokku/ci-docker-image:latest
stage: deploy
only:
- master
environment:
name: notes
url: https://notes.theorangeone.net
variables:
GIT_REMOTE_URL: ssh://dokku@d.theorangeone.net:7743/notes
GIT_PUSH_FLAGS: --force
script:
- dokku-deploy
after_script:
- dokku-unlock