Commit 22d04e60 authored by blackheaven's avatar blackheaven
Browse files

Update .gitlab-ci.yml file

parent 9a42eba3
Loading
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+41 −0
Original line number Diff line number Diff line
#
# 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

cache:
  paths:
    - node_modules/

default:
  before_script:
    - 'sed -i "1 i\baseurl = \"/capstone-design/01/hugo\"" config/production/config.toml'
    - apk add --no-cache go curl bash nodejs npm
    - npm install

test:
  script:
    - npm run check
    - npm test
  rules:
    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH

pages:
  script:
    - npm run build
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
 No newline at end of file