-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
43 lines (37 loc) · 771 Bytes
/
.gitlab-ci.yml
File metadata and controls
43 lines (37 loc) · 771 Bytes
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
image: node:latest
variables:
PUBLIC_URL: /
stages:
- build
- deploy
# Cache node modules for faster builds
cache:
paths:
- node_modules/
before_script:
- npm install -g sass
build:
stage: build
script:
# Compile SCSS files
- sass scss/main.scss:compiled_sass/main.css --style=compressed
# Create artifacts of all static files
- mkdir public
- cp -r *.html public/
- cp -r images public/
- cp -r js public/
- cp -r compiled_sass public/
- cp -r components public/
artifacts:
paths:
- public
expire_in: 1 week
pages:
stage: deploy
script:
- echo "Deploying to GitLab Pages..."
artifacts:
paths:
- public
only:
- main # Only deploy when changes are pushed to main branch