From 9bb084302ee6be2c12d0d5c85cd41768719e975e Mon Sep 17 00:00:00 2001 From: Leon Xu <6479451-leonxu260@users.noreply.gitlab.com> Date: Mon, 5 Jul 2021 09:50:02 -0700 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..53d1247 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,22 @@ +# requiring the environment of NodeJS 4.2.2 +image: node:latest +# add 'node_modules' to cache for speeding up builds +cache: + paths: + - node_modules/ # Node modules and dependencies +before_script: + - npm install -g hexo-cli # Install Hexo itself + - npm install # Install Hexo modules and dependencies + - npm install hexo-renderer-pug # Install pug + - npm install hexo-renderer-stylus # Install stylus +# the 'pages' job will deploy and build your site to the 'public' path +pages: + stage: deploy + script: + - hexo clean # HExo clean prior site + - hexo generate # Hexo generate Static Site + artifacts: + paths: + - public + only: + - master # this job will affect only the 'master' branch