Skip to content
Snippets Groups Projects
Commit 2cd8534d authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

tester oppdatering av stack + opplasting av build

parent eebaaa16
No related branches found
No related tags found
No related merge requests found
[default]
region=eu-west-1
credential_source = Environment
......@@ -12,3 +12,23 @@ build:
expire_in: 1 week
paths:
- dist
deploy:
image: uibit/awscli:latest
stage: deploy
script:
- rm -rf ~/.aws
- mv .aws ~/
- STACK_NAME=ordbok-frontend-beta
- if aws cloudformation describe-stacks --stack-name ${STACK_NAME} &> /dev/null
- then
- echo "stack exists"
- aws cloudformation update-stack --stack-name ${STACK_NAME} --template-body file://aws/api.yaml
- aws cloudformation wait stack-update-complete --stack-name ${STACK_NAME}
- else
- echo "creating stack"
- aws cloudformation create-stack --stack-name ${STACK_NAME} --template-body file://aws/api.yaml
- aws cloudformation wait stack-create-complete --stack-name ${STACK_NAME}
- fi
- aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
- aws s3 sync dist/ "s3://${STACK_NAME}.aws.uib.no" --delete
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment