forked from OpenBeta/open-tacos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
46 lines (38 loc) · 930 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
cache:
paths:
- node_modules/
- .cache
- public
image: registry.gitlab.com/openbeta/openbeta-nodejs-docker:16.3
variables:
GIT_DEPTH: 1
DOCKER_DRIVER: overlay2
gatsby-build:
stage: build
only: # Only run for these branches
- develop
- main
tags:
- docker
before_script:
- git show --summary
- if [ "$FORCE_CLEAN" == "true" ]; then rm -rf node_modules; fi;
- yarn install --no-progress
- if [ "$FORCE_CLEAN" == "true" ]; then ./node_modules/.bin/gatsby clean; fi;
- ./prebuild.sh # fetch content repo
script:
- ./node_modules/.bin/gatsby build
# Job name must be 'pages' in order for GitLab to deploy to static site
pages:
stage: build
tags:
- docker
needs: [gatsby-build]
only: # Only run for these branches
- develop
- main
script:
- ls -la public # Dummy command as required by Gitlab linter
artifacts: # Use by GitLab pages
paths:
- public