diff --git a/CHANGELOG.md b/CHANGELOG.md index 5df47fc..bed29a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - add zola executor configuration file(pr [#5]) +- add build job configuration using zola(pr [#6]) ### Changed @@ -27,3 +28,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#1]: https://github.com/jerus-org/zola-orb/pull/1 [#3]: https://github.com/jerus-org/zola-orb/pull/3 [#5]: https://github.com/jerus-org/zola-orb/pull/5 +[#6]: https://github.com/jerus-org/zola-orb/pull/6 diff --git a/src/jobs/build.yml b/src/jobs/build.yml new file mode 100644 index 0000000..45b0ba8 --- /dev/null +++ b/src/jobs/build.yml @@ -0,0 +1,41 @@ +description: > + Build public site using zola. + +executor: + name: zola + zola_version: <> + +parameters: + zola_version: + type: string + description: "The of zola to use" + update_submodules: + type: boolean + default: true + description: "If true, the git submodules will be updated." + +steps: + - checkout + + - when: + condition: << parameters.update_submodules >> + steps: + - run: + name: Sync git submodules + command: | + git submodule sync + + - run: + name: Update git submodules + command: | + git submodule update --init + + - run: + name: Confirm zola version + command: | + zola --version + + - run: + name: Build site + command: | + zola build