From 403fede3f51db5363fa53f01c511829cec5f0a69 Mon Sep 17 00:00:00 2001 From: Chris Coley <chris@codingallnight.com> Date: Sun, 23 Apr 2023 01:31:50 -0700 Subject: [PATCH] Add support for branch subdirectories --- .gitlab-ci.yml | 10 ++++++---- {public => src}/index.html | 2 +- {public => src}/style.css | 0 3 files changed, 7 insertions(+), 5 deletions(-) rename {public => src}/index.html (94%) rename {public => src}/style.css (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 313b5c4..5c50814 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,15 @@ image: alpine:latest +workflow: + rules: + - if: $CI_COMMIT_BRANCH + pages: stage: deploy tags: - docker script: - - echo 'Nothing to do...' + - cp -r src public/$CI_COMMIT_BRANCH artifacts: paths: - - public - only: - - master + - public/CI_COMMIT_BRANCH diff --git a/public/index.html b/src/index.html similarity index 94% rename from public/index.html rename to src/index.html index 6652c7d..1f9332b 100644 --- a/public/index.html +++ b/src/index.html @@ -13,7 +13,7 @@ <a href="https://gitlab.com/pages/">Other Examples</a> </div> - <h1>Hello World!</h1> + <h1>Hello World! Dev Branch</h1> <p> This is a simple plain-HTML website on GitLab Pages, without any fancy static site generator. diff --git a/public/style.css b/src/style.css similarity index 100% rename from public/style.css rename to src/style.css -- GitLab