2021-06-26 20:59:23 +01:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
2022-09-09 16:40:21 +01:00
|
|
|
build:
|
2022-09-09 16:39:21 +01:00
|
|
|
image: node:slim
|
2021-06-02 23:55:13 +01:00
|
|
|
stage: build
|
2021-06-03 17:11:36 +01:00
|
|
|
cache:
|
|
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
|
|
paths:
|
2022-09-09 15:50:05 +01:00
|
|
|
- .npm
|
2021-06-03 17:11:36 +01:00
|
|
|
- .cache
|
2021-06-02 23:55:13 +01:00
|
|
|
before_script:
|
2022-09-09 15:50:05 +01:00
|
|
|
- npm ci --cache .npm --prefer-offline
|
2021-06-02 23:55:13 +01:00
|
|
|
script:
|
2021-06-02 23:58:17 +01:00
|
|
|
- npm run build
|
2021-06-02 23:55:13 +01:00
|
|
|
artifacts:
|
|
|
|
name: '$CI_JOB_ID'
|
|
|
|
paths:
|
|
|
|
- ./public
|
|
|
|
expire_in: 30 mins
|
|
|
|
|
|
|
|
deploy:
|
2021-06-26 20:59:23 +01:00
|
|
|
image: dokku/ci-docker-image:latest
|
2021-06-02 23:55:13 +01:00
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
environment:
|
|
|
|
name: notes
|
|
|
|
url: https://notes.theorangeone.net
|
2021-06-03 08:29:44 +01:00
|
|
|
variables:
|
2021-06-26 20:59:23 +01:00
|
|
|
GIT_REMOTE_URL: ssh://dokku@d.theorangeone.net:7743/notes
|
|
|
|
GIT_PUSH_FLAGS: --force
|
|
|
|
script:
|
|
|
|
- dokku-deploy
|
|
|
|
after_script:
|
|
|
|
- dokku-unlock
|