Skip to content
Snippets Groups Projects
Commit 2a61f1f1 authored by psy's avatar psy
Browse files

Merge branch 'feature/preview' into 'main'

add preview and preview-fork build jobs

See merge request infra/static-pages/37c3-infos!17
parents f7086c4b 2eb5fc4b
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,47 @@ before_script:
- DEBIAN_FRONTEND=noninteractive apt -y install git
- pip install --break-system-packages -r requirements.txt
preview:
stage: build
only:
variables:
- $CI_PAGES_URL == "https://infra.cccv-pages.de/static-pages/37c3-infos"
except:
- main
variables:
script:
- mkdocs build
- du -sch public
artifacts:
paths:
- public
expire_in: 3 days
environment:
name: review/$CI_COMMIT_REF_NAME
url: "https://infra.cccv-pages.de/-/static-pages/37c3-infos/-/jobs/$CI_JOB_ID/artifacts/public/index.html"
# This only works for repos without a subgroup (i.e. "static-pages" in case
# of the regular preview job). There seems to be no way to reliably build
# Gitlab Pages artifact URLs that work in all cases.
preview-fork:
stage: build
only:
variables:
- $CI_PAGES_URL != "https://infra.cccv-pages.de/static-pages/37c3-infos"
except:
- main
variables:
script:
- mkdocs build
- du -sch public
artifacts:
paths:
- public
expire_in: 3 days
environment:
name: review/$CI_COMMIT_REF_NAME
url: "https://$CI_PROJECT_ROOT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html"
pages:
stage: deploy
......
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