mirror of
https://github.com/RealOrangeOne/notes.git
synced 2024-11-16 19:39:24 +00:00
37 lines
705 B
YAML
37 lines
705 B
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
static:
|
|
image: node:alpine
|
|
stage: build
|
|
cache:
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
paths:
|
|
- .yarn
|
|
- .cache
|
|
before_script:
|
|
- yarn install --cache-folder .yarn --prefer-offline --production --network-timeout 100000
|
|
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
|