0.0.5 • Published 1 year ago

@universium/deploy-aws-website v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Automatic static website deployment script

IMPORTANT: Requires NodeJS LTS:

npm install -g n && sudo n lts

It takes a static website content (with index.html file), and set up the AWS infrastructure to host that website (incl. AWS S3, AWS CloudFront, custom domains, SSL certificate).

Usage

1. Install dev dependency:

npm i @universium/deploy-aws-website --save-dev

2. Create appropriate deploy.json or deploy.env.json files inside your poject root directory. See the example below:

{
    "profile": "<aws config profile name>",
    "region": "<aws region>",
    "bucket": "<desired aws s3 bucket name>",
    "wwwroot": "<relative or absolute path where index.html is located>",
    "alias": "<custom domain name>"
}

3. Run the following script & follow the instructions:

node node_modules/@universium/deploy-aws-website/deploy.mjs [--envname]

4. Add the following script to your package.json scripts section:

{
  "scripts": {
    "deploy": "node node_modules/@universium/deploy-aws-website/deploy.mjs"
  }
}

Or, to build Angular & Deploy

{
  "scripts": {
    "deploy": "ng build && node node_modules/@universium/deploy-aws-website/deploy.mjs"
  }
}
  1. Run the following on code changes:
npm run deploy [-- --envname]
  1. Enjoy!
0.0.5

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago