GithubHelp home page GithubHelp logo

sumn2u / react-deploy-cli Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 417 KB

CLI tool to deploy React App to S3 and CloudFront

Home Page: https://www.react-deploy.com/

License: MIT License

JavaScript 99.02% HTML 0.98%
react cli react-cli s3 s3-bucket revision react-deploy

react-deploy-cli's People

Contributors

sumn2u avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

artursmirnov

react-deploy-cli's Issues

Activating a specific version using the activate command sometime does not work

image

BUG:
For some strange reasons, this activate command does not work

react-deploy activate $CI_COMMIT_SHORT_SHA development

My deploy.js looks likes this

/* eslint-env node */
require('dotenv').config()
module.exports = function (deployTarget) {
  const ENV = {
    // build: {},
    build: {
      localDir: 'build/',
      deleteRemoved: false,
      s3Params: {
        Bucket: 'mys3buckettest',
      },
    },
  }

  const awsaccessKeyId = process.env.REACT_APP_AWS_ACCESS_KEY_ID
  const awssecretAccessKey = process.env.REACT_APP_AWS_SECRET_ACCESS_KEY
  if (deployTarget === 'development') {
    ENV.build.environment = 'development'

    ENV.s3 = {
      accessKeyId: `${awsaccessKeyId}`,
      secretAccessKey: `${awssecretAccessKey}`,
      region: 'ap-southeast-1',
      sslEnabled: true,
      Bucket: 'mys3buckettest',
    }
  }

  if (deployTarget === 'staging') {
    ENV.build.environment = 'staging'
    // configure other plugins for staging deploy target here
  }

  if (deployTarget === 'production') {
    ENV.build.environment = 'production'
    // configure other plugins for production deploy target here
  }

  // Note: if you need to build some configuration asynchronously, you can return
  // a promise that resolves with the ENV object instead of returning the
  // ENV object synchronously.
  return ENV
}

I can see commit hash changes with s3 upload, but cannot find way to fix this issue. ANY THOUGHTS???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.