Skip to content

Instantly share code, notes, and snippets.

@vishwasnavadak
Last active December 15, 2019 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishwasnavadak/8cae8fedffa9d0838b203bc94f0e2c4e to your computer and use it in GitHub Desktop.
Save vishwasnavadak/8cae8fedffa9d0838b203bc94f0e2c4e to your computer and use it in GitHub Desktop.
name: Serverless Deployement Example
# Triggers the action everty time there is a code push to the master branch
on:
push:
branches:
- master
# Specify what jobs to run
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
env: #Setup environmental variables for serverless deployment
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
# Use github defaut action to trigger action in this repo. Mandatory
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#using-the-checkout-action
- uses: actions/checkout@v1
- name: npm install dependencies
run: npm install
- name: Serverless
uses: serverless/github-action@v1.53.0
with:
args: deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment