Testing CI

This commit is contained in:
Ladd Hoffman 2023-02-09 14:15:16 -06:00
parent 7d89df7a61
commit 6012cb2d1a
1 changed files with 20 additions and 14 deletions

View File

@ -1,24 +1,30 @@
pages: workflow:
rules: rules:
- if: '$CI_COMMIT_REF_NAME == "main"' - if: $CI_COMMIT_BRANCH
artifacts:
paths:
- public
script:
- mkdir public
- cp -r forum-network/src/* public/
pages-dev: pages:
stage: deploy
rules: rules:
- if: '$CI_COMMIT_REF_NAME == "dev"' - if: $CI_COMMIT_BRANCH == "main"
artifacts:
paths:
- public
script: script:
- mkdir public - mkdir public
- cp -r forum-network/src/* public/ - cp -r forum-network/src/* public/
artifacts:
paths:
- public
artifacts:
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH != "main"'
script:
- mkdir public
- cp -r forum-network/src/* public/
artifacts:
paths:
- public
environment: environment:
name: Develop name: "${CI_COMMIT_BRANCH} ${CI_JOB_NAME}"
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" 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: variables:
PUBLIC_URL: "/-/${CI_PROJECT_PATH#"${CI_PROJECT_ROOT_NAMESPACE}/"}/-/jobs/$CI_JOB_ID/artifacts/public/index.html" PUBLIC_URL: "/-/${CI_PROJECT_PATH#"${CI_PROJECT_ROOT_NAMESPACE}/"}/-/jobs/$CI_JOB_ID/artifacts/public/index.html"