Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 3afad515 authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

feat: create one env by MR

parent afd55c73
No related branches found
No related tags found
1 merge request!1Resolve "add branch environment"
......@@ -2,6 +2,10 @@ image: debian:11.0-slim
stages:
- 📝publish
- 🧽clean
variables:
SUB_GROUP: "poc"
pages:
stage: 📝publish
......@@ -22,3 +26,26 @@ pages:
# if it's a group: https://<group-name>.froggit.page/<sub-group-name>/<project-name>
url: "${CI_PAGES_URL}"
pages:preview:
extends: pages
artifacts:
expire_in: 1 week
rules:
- if: $CI_MERGE_REQUEST_IID
environment:
name: preview/${CI_COMMIT_REF_NAME}
url: "https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${SUB_GROUP}/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/public/index.html"
on_stop: pages:preview:stop
pages:preview:stop:
stage: 🧽clean
rules:
- if: $CI_MERGE_REQUEST_IID
when: manual
allow_failure: true
environment:
name: preview/${CI_COMMIT_REF_NAME}
action: stop
script:
- echo "👋 bye"
......@@ -8,7 +8,7 @@
</head>
<body>
<h1>Hello ${CI_COMMIT_BRANCH} !</h1>
<h1>Hello ${CI_COMMIT_BRANCH}${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} !</h1>
<p>
This is a simple plain-HTML website on Froggit Pages, without any fancy static site generator.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment