1
Fork 0
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-11-16 21:59:03 +00:00
notes/.gitlab-ci.yml

45 lines
735 B
YAML
Raw Normal View History

2021-06-26 20:59:23 +01:00
stages:
- build
2022-09-09 17:11:51 +01:00
- test
2021-06-26 20:59:23 +01:00
- deploy
2022-09-09 16:40:21 +01:00
build:
image: node:slim
stage: build
2021-06-03 17:11:36 +01:00
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm
2021-06-03 17:11:36 +01:00
- .cache
before_script:
- npm ci --cache .npm --prefer-offline
script:
2021-06-02 23:58:17 +01:00
- npm run build
artifacts:
2022-09-09 17:11:51 +01:00
name: "$CI_JOB_ID"
paths:
- ./public
expire_in: 30 mins
2022-09-09 17:11:51 +01:00
prettier:
image: node:slim
stage: test
script:
- npm run prettier
deploy:
2021-06-26 20:59:23 +01:00
image: dokku/ci-docker-image:latest
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