From 22384affaf158eac1338806d517d579069619e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20M=C4=9Brka?= <405417@mail.muni.cz> Date: Tue, 11 Dec 2018 12:36:17 +0000 Subject: [PATCH] Add .gitlab-ci.yml file. --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8b0a0b6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# requiring the environment of NodeJS 10 +image: node:10 + +# add 'node_modules' to cache for speeding up builds +cache: + paths: + - node_modules/ # Node modules and dependencies + +before_script: + - npm install gitbook-cli -g # install gitbook + - gitbook fetch 3.2.3 # fetch final stable version + - gitbook install # add any requested plugins in book.json + +test: + stage: test + script: + - gitbook build . public # build to public path + only: + - branches # this job will affect every branch except 'master' + except: + - master + +# the 'pages' job will deploy and build your site to the 'public' path +pages: + stage: deploy + script: + - gitbook build . public # build to public path + artifacts: + paths: + - public + expire_in: 1 week + only: + - master # this job will affect only the 'master' branch -- GitLab