Created
February 26, 2019 15:51
-
-
Save croossin/30f856cc86647c43e4b1025d53cdbba8 to your computer and use it in GitHub Desktop.
GitLab CD for Vue.js app to AWS S3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- build | |
- deploy | |
build prod: | |
image: node:10.15.0-stretch | |
stage: build | |
only: | |
- tags | |
script: | |
# Install vuecli | |
- npm install -g @vue/cli@latest | |
# Install dependencies | |
- npm install | |
# Build App | |
- npm run build | |
artifacts: | |
paths: | |
# Build folder | |
- dist/ | |
expire_in: 1 hour | |
deploy prod: | |
image: python:latest | |
stage: deploy | |
only: | |
- tags | |
script: | |
- pip install awscli | |
- aws s3 sync ./dist s3://YOUR_BUCKET_NAME | |
build stage: | |
image: node:10.15.0-stretch | |
stage: build | |
only: | |
- master | |
script: | |
# Install vuecli | |
- npm install -g @vue/cli@latest | |
# Install dependencies | |
- npm install | |
# Build App | |
- npm run build-dev | |
artifacts: | |
paths: | |
# Build folder | |
- dist/ | |
expire_in: 1 hour | |
deploy stage: | |
image: python:latest | |
stage: deploy | |
only: | |
- master | |
script: | |
- pip install awscli | |
- aws s3 sync ./dist s3://YOUR_DEV_BUCKET_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment