-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
103 lines (92 loc) · 1.59 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
image: node:14
variables:
NODE_ENV: test
cache:
key:
files:
- yarn.lock
paths:
- node_modules
stages:
- lint
- test
- build
- deploy
before_script:
- env
- yarn
lint-js:
stage: lint
script: yarn test:lint:js
only:
changes:
- "**/*.js"
- "**/*.jsx"
- "**/*.ts"
- "**/*.tsx"
- ".eslintignore"
- ".eslintrc.js"
lint-sass:
stage: lint
script: yarn test:lint:sass
only:
changes:
- "**/*.scss"
- "**/*.css"
- ".stylelintrc.json"
jest:
stage: test
script: yarn test:jest
only:
changes:
- "**/*.js"
- "**/*.json"
- "app/soapbox/**/*"
- "webpack/**/*"
- "jest.config.js"
- "package.json"
- "yarn.lock"
build-production:
stage: build
script: yarn build
variables:
NODE_ENV: production
artifacts:
paths:
- static
docs-deploy:
stage: deploy
image: alpine:latest
before_script:
- apk add curl
script:
- curl -X POST -F"token=$CI_JOB_TOKEN" -F'ref=master' https://gitlab.com/api/v4/projects/15685485/trigger/pipeline
only:
refs:
- develop
changes:
- "docs/**/*"
# Supposed to fail when translations are outdated, instead always passes
#
# i18n:
# stage: build
# script: yarn manage:translations
# variables:
# NODE_ENV: development
# before_script:
# - yarn
# - yarn build
pages:
stage: deploy
before_script: []
script:
# artifacts are kept between jobs
- mv static public
variables:
NODE_ENV: production
artifacts:
paths:
- public
only:
refs:
- develop