Update .gitlab-ci.yml

This commit is contained in:
Iain Learmonth 2021-12-13 18:36:16 +00:00
parent db68267eef
commit a059d134c3

View file

@ -1,6 +1,6 @@
build:
pages: # the job must be named pages
image: node:latest
stage: build
stage: deploy
before_script:
# - ./update_version.sh
- echo $CI_COMMIT_TIMESTAMP $CI_COMMIT_SHORT_SHA > src/assets/version.txt
@ -11,33 +11,17 @@ build:
- npm run build
- mv public public-vue # GitLab Pages hooks on the public folder
- mv dist public # rename the dist folder (result of npm run build)
artifacts:
paths:
- public
pages: # the job must be named pages
image: node:latest
stage: deploy
script:
- echo "Deploy to GitLab pages"
artifacts:
paths:
- public # artifact path must be /public for GitLab Pages to pick it up
only:
- dev
- main
s3-deploy:
stage: .post
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
script:
- aws s3 sync ./public s3://gp-web-prod-shared-weblite-bucket --delete --only-show-errors
only:
- main
s3-deploy-dev:
stage: .post
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
script:
- aws s3 sync ./public s3://gp-web-prod-shared-weblite-bucket-dev --delete --only-show-errors
only:
- dev
- main