Skip to content

Instantly share code, notes, and snippets.

@theoomoregbee
Last active December 19, 2019 12:35
Show Gist options
  • Save theoomoregbee/bca2ce0d511f88ac8d35a92f6b3ac3e0 to your computer and use it in GitHub Desktop.
Save theoomoregbee/bca2ce0d511f88ac8d35a92f6b3ac3e0 to your computer and use it in GitHub Desktop.
gitlab s3-deployed-ci-app
image: node:8
cache:
paths:
- node_modules/
before_script:
- apt-get update
- apt-get install -y -qq python3-dev python3-pip
- pip3 install --upgrade awscli
- export PATH=./node_modules/.bin:$PATH
- npm install
variables:
BUCKET: "s3-deployed-app"
LOCAL_DIR: "build"
deploy_development:
stage: deploy
environment:
name: Development
only:
- develop
script:
- npm run build
- export UPLOAD_DIR=development
- awss3-deploy
deploy_staging:
stage: deploy
environment:
name: Staging
only:
- master
script:
- npm run build
- export UPLOAD_DIR=staging
- awss3-deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment