Skip to content

Instantly share code, notes, and snippets.

@thecfguy
Last active July 5, 2019 06:48
Show Gist options
  • Save thecfguy/631fde0d1ecfdb5e01193252d8950904 to your computer and use it in GitHub Desktop.
Save thecfguy/631fde0d1ecfdb5e01193252d8950904 to your computer and use it in GitHub Desktop.
stages:
- deploy
deploy_production:
stage: deploy
script:
- npm install
- npm run build --prod
- echo "Deploy to Production server"
- aws s3 sync ./dist s3://$BUCKETNAME/ --acl=public-read --delete
- echo "Invalidate index.html"
- aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths /index.html
environment:
name: production
url: https://cname-url
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment