Commit aa25eb54 authored by Ruben ten Hove's avatar Ruben ten Hove Committed by Federico Falconieri
Browse files

feat: pages dev env

parent 3921f786
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@ include:
  - local: project-automation/gitlab/py-in-ci.yml
  - local: docs/prettier.yml

pages:
  stage: test
.pages:
  variables:
    HUGO_BASEURL: ${CI_PAGES_URL}
  before_script:
@@ -28,6 +27,9 @@ pages:
    - cp ${CI_PROJECT_DIR}/README.md content/index.md
  needs: []

pages:
  stage: test

# child pipeline to unit tests all our jobs

jobs:c:
+19 −4
Original line number Diff line number Diff line
@@ -2,15 +2,15 @@
# Publishes a hugo repo as GitLab pages.
# The job name must be pages for it to work.

pages:
.pages:
  image:
    name: registry.gitlab.com/just-ci/images/hugo:latest
    entrypoint: [""]
  variables:
    MINIFY: "false"
    EXTRA_ARGS: ""
  stage: build
  # Add a before script to add an external theme, for example:
  # .pages:
  #   before_script:
  #     - git clone https://github.com/matcornic/hugo-theme-learn.git themes/hugo-theme-learn
  script:
@@ -34,3 +34,18 @@ pages:
    paths:
      - public
    when: always

pages:
  extends: .pages
  stage: build
  rules:
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

pages:dev:
  extends: .pages
  stage: test
  environment:
    name: Development
    url: "https://$CI_SERVER_URL/-/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/file/public/index.html"
  rules:
    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH