Testing publishing dev branch to separate URL

This commit is contained in:
Ladd Hoffman 2023-02-09 13:52:16 -06:00
parent 90eded96e5
commit 87f04bd7d3
1 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,24 @@
pages: pages:
script: rules:
- mkdir public - if: '$CI_COMMIT_REF_NAME == "main"'
- cp -r forum-network/src/* public/
artifacts: artifacts:
paths: paths:
- public - public
script:
- mkdir public
- cp -r forum-network/src/* public/
pages:
rules:
- if: '$CI_COMMIT_REF_NAME == "dev"'
artifacts:
paths:
- public
script:
- mkdir public
- cp -r forum-network/src/* public/
environment:
name: Develop
url: "${CI_SERVER_PROTOCOL}://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_PATH#"${CI_PROJECT_ROOT_NAMESPACE}/"}/-/jobs/$CI_JOB_ID/artifacts/public/index.html"
variables:
PUBLIC_URL: "/-/${CI_PROJECT_PATH#"${CI_PROJECT_ROOT_NAMESPACE}/"}/-/jobs/$CI_JOB_ID/artifacts/public/index.html"