-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
53 lines (49 loc) · 966 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
52
53
stages:
- build
- deploy
variables:
ARTIFACT_COMPRESSION_LEVEL: "fast"
CACHE_COMPRESSION_LEVEL: "fast"
workflow:
rules:
- if: >
($CI_COMMIT_REF_NAME == "main"
&& $CI_PIPELINE_SOURCE == "push")
changes:
- src/**/*
- index.html
- vite.config.ts
when: always
- if: '$CI_PIPELINE_SOURCE == "web"'
when: always
vite-build:
stage: build
image: docker.io/node:16
cache:
key: dist
paths:
- dist/
policy: pull-push
before_script:
- npm install
script:
- npm run build
rclone-sync:
stage: deploy
image:
name: docker.io/rclone/rclone:1.61
entrypoint: [""]
cache:
key: dist
paths:
- dist/
policy: pull
variables:
GIT_STRATEGY: none
RCLONE_CONFIG_SWITCH_TYPE: "s3"
RCLONE_S3_PROVIDER: "Other"
RCLONE_S3_ENV_AUTH: "true"
script:
- >
rclone --verbose sync
dist switch:gleo --exclude 'favicon.ico'