Skip to content

Commit

Permalink
deploy added
Browse files Browse the repository at this point in the history
  • Loading branch information
im-Amitto committed May 27, 2020
1 parent cc22038 commit 2ce9490
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
30 changes: 20 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
image: node:10.16.3

# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
#AWS access keys stored as secret variables

variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

#This declares the pipeline stages
stages:
- test

run-build:
stage: test
script:
- cd src/frontend/
- npm install # Install all dependencies
- npm run build
- npm run webpack-build
- buildthendeploy

buildbuildthendeploy:
stage: buildthendeploy
script:
- cd src/frontend/
- npm install
- npm run build
- apt update
- apt -y install awscli
- npm run-script deploy
3 changes: 2 additions & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"start": "react-scripts start",
"webpack": "webpack -w",
"build": "react-scripts build",
"webpack-build": "webpack"
"webpack-build": "webpack",
"deploy": "aws s3 cp ./build s3://testingdeploy --recursive --acl public-read --region ap-south-1"
},
"engines": {
"node": "10.16.0",
Expand Down

0 comments on commit 2ce9490

Please sign in to comment.