aboutsummaryrefslogtreecommitdiff
path: root/gitlab-ci.yml
diff options
context:
space:
mode:
authorKaran Jayachandra <karan.jayachandra@nxp.com>2023-09-21 16:22:31 +0200
committerKaran Jayachandra <karan.jayachandra@nxp.com>2023-09-21 16:22:31 +0200
commitdc64921361796ed730ac433dcc5f70b17137ca4f (patch)
tree61a99d0629b93bffe71996979bc13d1117af961f /gitlab-ci.yml
parent79f08b42bb6af30b3e713a5b2c1a8904078d3af5 (diff)
Added CI for Gitlab Pages
Diffstat (limited to 'gitlab-ci.yml')
-rw-r--r--gitlab-ci.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/gitlab-ci.yml b/gitlab-ci.yml
new file mode 100644
index 0000000..222ac14
--- /dev/null
+++ b/gitlab-ci.yml
@@ -0,0 +1,38 @@
+#
+# Before using this .gitlab-ci.yml:
+#
+# - This example uses the latest Docker image, but you might want to use the
+# exact version to avoid any broken pipelines.
+# All available Hugo versions are listed under https://gitlab.com/pages/hugo/container_registry.
+# - Read about the difference between hugo and hugo_extended
+# https://gitlab.com/pages/hugo/-/blob/main/README.md#hugo-vs-hugo_extended.
+# - To change the theme, see
+# https://gitlab.com/pages/hugo/-/blob/main/README.md#use-a-custom-theme.
+#
+image: registry.gitlab.com/pages/hugo/hugo_extended:latest
+
+variables:
+ HUGO_ENV: production
+ THEME_URL: "github.com/theNewDynamic/gohugo-theme-ananke"
+
+default:
+ before_script:
+ - apk add --no-cache go curl bash nodejs
+ - hugo mod get -u $THEME_URL
+ ## Uncomment the following if you use PostCSS. See https://gohugo.io/hugo-pipes/postcss/
+ #- npm install postcss postcss-cli autoprefixer
+
+test:
+ script:
+ - hugo
+ rules:
+ - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
+
+pages:
+ script:
+ - hugo
+ artifacts:
+ paths:
+ - public
+ rules:
+ - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH