GitHub Action to deploy a NodeJS app to AWS Serverless
Перейти к файлу
Lukas Gravley 0e9035e9e0
Merge pull request #8 from nickbenedetti/patch-1
Fix spelling in README.md
2020-12-08 08:34:28 -06:00
.github fixing linter 2020-12-08 08:14:57 -06:00
TEMPLATE fixed it 2019-10-18 10:27:01 -05:00
lib Update entrypoint.sh 2019-10-29 09:46:33 -05:00
.gitignore Initial commit 2019-10-09 09:55:43 -05:00
Dockerfile Update Dockerfile 2020-12-04 10:29:41 -08:00
LICENSE Initial commit 2019-10-09 09:55:43 -05:00
README.md Fix spelling in README.md 2020-07-16 13:47:25 -07:00
action.yml cleanup 2020-12-08 08:24:27 -06:00

README.md

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 their 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