Git Product home page Git Product logo

deploy-nodejs's Introduction

deploy-nodejs

This repository is for the GitHub Action to deploy a NodeJS application to AWS Serverless.
Developers on GitHub can call this Action to take their current NodeJS application, and pass basic variables to help deploy thier application.

How to use

To use this GitHub Action you will need to complete the following:

  • Copy the template file TEMPLATE/aws-config.yml to your repository in the location: .github/aws-config.yml
  • Validate all variables are correct and allow for proper permissions on AWS
  • Add the Github Action: Deploy NodeJS to AWS Serverless to your current Github Actions workflow
  • Enjoy your application on AWS

Example GitHub Action Workflow

In your repository you should have a workflows folder similar to below:

  • .github/workflows/deploy.yml

This file should have the following code:

---
###########################
###########################
## Deploy GitHub Actions ##
###########################
###########################
name: NodeJS AWS SAM Deploy

#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on: ['push']

###############
# Set the Job #
###############
jobs:
  build:
    # Name the Job
    name: NodeJS AWS SAM Deploy
    # Set the agent to run on
    runs-on: ubuntu-latest

    ##################
    # Load all steps #
    ##################
    steps:
      ##########################
      # Checkout the code base #
      ##########################
      - name: Checkout Code
        uses: actions/checkout@master

      #############################
      # Run NodeJS AWS SAM Deploy #
      #############################
      - name: NodeJS AWS SAM Deploy
        uses: docker://admiralawkbar/aws-nodejs:latest
        env:
           AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
           AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
...

NOTE: You will need to create the GitHub Secrets for:

  • AWS_ACCESS_KEY
    • Valid AWS Access key to authenticate to your AWS Account
  • AWS_SECRET_KEY
    • Valid AWS Access Secret key to authenticate to your AWS Account

How to contribute

If you would like to help contribute to this Github Action, please see CONTRIBUTING


License

deploy-nodejs's People

Contributors

admiralawkbar avatar

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.