1
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-07-01 09:53:53 +01:00
notes/.gitlab-ci.yml
Jake Howard 93bfe5f59b
Use dockerfile for production
The static buildpack is deprecated, and this is a lot easier
2022-09-09 16:39:21 +01:00

38 lines
650 B
YAML

stages:
- build
- deploy
static:
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
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