Skip to content

Commit f239c07

Browse files
author
Francesco Sardone
authored
refactor(ci): add persistency to build job
1 parent 46bda63 commit f239c07

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.circleci/config.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
version: 2.1
22

3-
jobs:
4-
verify:
3+
executors:
4+
alpine-environment:
55
docker:
66
- image: node:18.7.0-alpine3.16
7+
8+
jobs:
9+
verify:
10+
executor: alpine-environment
711

812
steps:
913
- checkout
@@ -13,8 +17,7 @@ jobs:
1317
command: "echo Verify job is working!"
1418

1519
build:
16-
docker:
17-
- image: node:18.7.0-alpine3.16
20+
executor: alpine-environment
1821

1922
steps:
2023
- checkout
@@ -38,10 +41,15 @@ jobs:
3841
- run:
3942
name: "Building Site"
4043
command: "hugo --gc --minify"
44+
45+
- persist_to_workspace:
46+
root: .
47+
48+
paths:
49+
- ./public
4150

4251
deploy:
43-
docker:
44-
- image: node:18.7.0-alpine3.16
52+
executor: alpine-environment
4553

4654
steps:
4755
- checkout
@@ -89,7 +97,11 @@ workflows:
8997

9098
deploy:
9199
jobs:
100+
- build
92101
- deploy:
102+
requires:
103+
- build
104+
93105
filters:
94106
branches:
95107
only:

0 commit comments

Comments
 (0)