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:
script:
- mkdir public
- cp -r forum-network/src/* public/
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
artifacts:
paths:
- 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"