Skip to content

Commit

Permalink
refactor(ci): add persistency to build job
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Sardone authored Aug 9, 2022
1 parent 46bda63 commit f239c07
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 2.1

jobs:
verify:
executors:
alpine-environment:
docker:
- image: node:18.7.0-alpine3.16

jobs:
verify:
executor: alpine-environment

steps:
- checkout
Expand All @@ -13,8 +17,7 @@ jobs:
command: "echo Verify job is working!"

build:
docker:
- image: node:18.7.0-alpine3.16
executor: alpine-environment

steps:
- checkout
Expand All @@ -38,10 +41,15 @@ jobs:
- run:
name: "Building Site"
command: "hugo --gc --minify"

- persist_to_workspace:
root: .

paths:
- ./public

deploy:
docker:
- image: node:18.7.0-alpine3.16
executor: alpine-environment

steps:
- checkout
Expand Down Expand Up @@ -89,7 +97,11 @@ workflows:

deploy:
jobs:
- build
- deploy:
requires:
- build

filters:
branches:
only:
Expand Down

0 comments on commit f239c07

Please # to comment.