diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 313b5c40b5dd2237adf7c8489c8c67a275dea28a..43390fcfa3958e9c2439cbb57ef79670851100d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,19 @@ image: alpine:latest -pages: +workflow: + rules: + - if: $CI_COMMIT_BRANCH + +deploy-docs: stage: deploy tags: - docker script: - - echo 'Nothing to do...' + - sed -i "s/%%BRANCH%%/$CI_COMMIT_BRANCH/g" src/index.html + - mv src public artifacts: paths: - - public - only: - - master + - public/ + environment: + name: $CI_COMMIT_BRANCH + url: "https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html" diff --git a/public/index.html b/src/index.html similarity index 91% rename from public/index.html rename to src/index.html index 6652c7dd60ad34f6d80148f3c8e6876702d19854..ac6769c1681722bd77aa58cccc21cb17940baa6e 100644 --- a/public/index.html +++ b/src/index.html @@ -18,6 +18,9 @@ <p> This is a simple plain-HTML website on GitLab Pages, without any fancy static site generator. </p> + <p> + It was built on the %%BRANCH%% branch + </p> </body> </html> diff --git a/public/style.css b/src/style.css similarity index 100% rename from public/style.css rename to src/style.css