Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

stack-spot/web-react-deploy

Repository files navigation

  • Description: The plugin web-react-deploy adds to a stack the capability to create AWS resourses and deploy the application in the AWS environment created.

  • Category: Resources

  • Stack: matter-web-react

  • Created: 23/03/2022

  • Last update: 23/03/2022

  • Download: https://github.com/stack-spot/web-react-deploy.git

About the plugin

web-react-deploy

The web-react-deploy is a plugin for the matter-web-react stack that adds the code needed to crate AWS resources that are necessary to deploy the application to your AWS environment. It also adds to you project the github action files needed for running tests, building and deploying the application in this environment.

Usage

Prerequisites

  • STK cli

  • zup-web-react stack downloaded in your stk cli

  • An application created with the stack zup-web-react and the --stages param. If the --stages params wasn't used to create the application, it is necessary to create a stages folder in the level of the app and a file named <stage_name>.json inside it with the following format:

    {
    "cloud": {
        "account": {
            "id": "<aws_account_id>",
            "region": "<aws-region>"
        }
      }
    }
    
  • yarn or npm

  • AWS secrets set in the environment variables

  • A github Identity provider in your AWS account and an IAM role with access to s3 and a trust relashionship with this identity provider. (Example)

  • This IAM role arn configured as a secret in the project github with the name PIPELINE_RELEASE_ROLE

Usage example

Configure your aws environment variables.

Apply the plugin

stk apply plugin web-react-deploy

Create the resources in your aws environment

stk run deploy-env <stage>

Commit and push your code.

After merging the commited changes, generate a release in github with the format <stage>-v0.0.0.

The release action is going to start in github and if no errors happens with the tests, build or quality with your code the release is going to be deployed in the created environment.