Commit 512fcd22 authored by Jure's avatar Jure

feat(docs): update GitLab CI for styleguide deployment

parent 1fb57270
Pipeline #11550 failed
......@@ -9,9 +9,7 @@ stages:
- audit
- test
- review
- staging
- production
- demo
build:
image: docker:latest
......@@ -26,7 +24,32 @@ build:
- echo "Ignore warning! Cannot perform an interactive login from a non TTY device"
- docker push $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
audit:
pages:
stage: production
script:
- yarn styleguide
- cp -R docs/styleguide/ public/
artifacts:
paths:
- public/
only:
- master # this job will affect only the 'master' branch
pages:review:
stage: review
script:
- yarn styleguide
- cp -R docs/styleguide/ review/
artifacts:
paths:
- review
except:
- master
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_PROJECT_NAMESPACE.coko.foundation/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/review/index.html
audit:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
except:
......@@ -36,7 +59,7 @@ audit:
script:
- cd ${HOME}
- yarn audit
lint:style:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
......@@ -69,7 +92,7 @@ lint:json:
script:
- cd ${HOME}
- yarn lint:json
lint:commits:
image: $IMAGE_ORG/$IMAGE_NAME:$CI_COMMIT_SHA
stage: test
......@@ -114,90 +137,4 @@ push:latest:
only:
- master
except:
- tags
# -----------------------------------------------
# ui --------------------------------------------
# -----------------------------------------------
review:ui:
image: pubsweet/deployer:latest
stage: review
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
# !! kube-lego will fail if domain > 63 chars
url: "http://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
on_stop: stop_review:ui
except:
- master
- tags
script:
- source deploy.sh
- create_deployment
stop_review:ui:
image: pubsweet/deployer:latest
stage: review
variables:
PACKAGE_NAME: ui
GIT_STRATEGY: none
environment:
name: $PACKAGE_NAME/review/$CI_COMMIT_REF_NAME
action: stop
when: manual
except:
- master
- tags
script:
- source deploy.sh
- delete_deployment
staging:ui:
image: pubsweet/deployer:latest
stage: staging
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/staging
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
only:
- master
except:
- tags
script:
- source deploy.sh
- create_deployment
production:ui:
image: pubsweet/deployer:latest
stage: production
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/production
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when: manual
only:
- master
except:
- tags
script:
- source deploy.sh
- create_deployment
demo:ui:
image: pubsweet/deployer:latest
stage: demo
variables:
PACKAGE_NAME: ui
environment:
name: $PACKAGE_NAME/demo
url: "https://${CI_ENVIRONMENT_SLUG}.${BASE_DOMAIN}"
when: manual
except:
- tags
script:
- source deploy.sh
- create_deployment
- tags
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment