-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
76 lines (69 loc) · 1.42 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
stages:
- test
- deploy
- pages
- release
variables:
GIT_DEPTH: 0
test:
image:
name: denoland/deno:1.46.3
stage: test
script:
- deno task test
lint:
image:
name: denoland/deno:1.46.3
stage: test
allow_failure: true
script:
- deno test -q --check --no-run
- deno fmt -q --check
dokku-deploy:
image:
name: dokku/ci-docker-image
stage: deploy
only:
- main
variables:
GIT_REMOTE_URL: ssh://[email protected]:22/bastilian-me-deno
GIT_PUSH_FLAGS: --force
script:
- dokku-deploy
deno-deploy:
image:
name: denoland/deno:1.46.3
stage: deploy
only:
- main
script:
- bash && deno install --global -Arf jsr:@deno/deployctl
- bash && deno task build
- bash && deployctl deploy --prod --project=bastilian-me main.ts
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- echo "running release_job for $TAG"
release:
tag_name: 'v$CI_COMMIT_SHORT_SHA'
description: 'v$CI_COMMIT_SHORT_SHA'
ref: '$CI_COMMIT_SHA'
pages:
only:
- main
image:
name: denoland/deno:1.46.3
stage: pages
script:
- mkdir -p public
- deno task test && mv coverage/html ./public/coverage
- deno task docs && mv docs ./public/docs
artifacts:
paths:
- public