-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
51 lines (46 loc) · 1004 Bytes
/
.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
.base-cache:
image: registry.ulbricht.casa/docker-images/trunk-docker-base-image:latest
variables:
CARGO_HOME: $CI_PROJECT_DIR/.cargo
cache:
key: $CI_PROJECT_NAME
paths:
- $CI_PROJECT_DIR/dist/
- $CI_PROJECT_DIR/target/
- $CI_PROJECT_DIR/.cargo/
- $CI_PROJECT_DIR/Cargo.lock
stages:
- lint
- build
- deploy
lint:
extends:
- .base-cache
stage: lint
script:
- cargo clippy -p yew-cosmo-docs --release
build:
extends:
- .base-cache
stage: build
script:
- trunk build --release --dist="public"
deploy:
image: registry.ulbricht.casa/docker-images/trunk-docker-base-image:latest
stage: deploy
script:
- cargo publish --token ${CARGO_REGISTRY_TOKEN}
rules:
- if: $CI_COMMIT_TAG
pages:
extends:
- .base-cache
stage: deploy
script:
- trunk build --release --dist="public"
- echo "/* /index.html 200" > public/_redirects
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_TAG