sumn2u / react-deploy-cli Goto Github PK
View Code? Open in Web Editor NEWCLI tool to deploy React App to S3 and CloudFront
Home Page: https://www.react-deploy.com/
License: MIT License
CLI tool to deploy React App to S3 and CloudFront
Home Page: https://www.react-deploy.com/
License: MIT License
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???
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.