Update .gitlab-ci.yml
This commit is contained in:
parent
54c8b6597d
commit
d90967ba5e
1 changed files with 27 additions and 1 deletions
|
|
@ -1,6 +1,25 @@
|
|||
pages: # the job must be named pages
|
||||
image: node:latest
|
||||
stage: deploy
|
||||
before_script:
|
||||
# - ./update_version.sh
|
||||
- echo $CI_COMMIT_TIMESTAMP $CI_COMMIT_SHORT_SHA > src/assets/version.txt
|
||||
- npm install -g workbox-cli
|
||||
script:
|
||||
- export NODE_OPTIONS=--openssl-legacy-provider
|
||||
- npm ci
|
||||
- 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 # artifact path must be /public for GitLab Pages to pick it up
|
||||
only:
|
||||
- dev
|
||||
|
||||
build:
|
||||
image: node:latest
|
||||
stage: build
|
||||
before_script:
|
||||
# - ./update_version.sh
|
||||
- echo $CI_COMMIT_TIMESTAMP $CI_COMMIT_SHORT_SHA > src/assets/version.txt
|
||||
|
|
@ -22,6 +41,13 @@ s3-deploy:
|
|||
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
|
||||
- aws s3 sync ./public s3://gp-web-prod-shared-weblite-bucket-dev --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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue