Skip to content
zap

GitHub Action

Serverless

v1.53.0 Latest version
Use latest version
zap

Serverless

Wraps the Serverless Frameork to enable common Serverless commands

Installation

Copy and paste the following snippet into your .yml file.

- name: Serverless
  uses: serverless/github-action@v1.53.0
Learn more about this action in serverless/github-action
Choose a version

Github Action for Serverless

This Action wraps the Serverless Framework to enable common Serverless commands.

This project is looking for maintainers!

If you would like to be a maintainer of this project, please reach out to one of the active Serverless organization members to express your interest.

Welcome, and thanks in advance for your help!

Usage

An example workflow to deploy a project with serverless v3:

name: Deploy master branch

on:
  push:
    branches:
      - master

jobs:
  deploy:
    name: deploy
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x, 16.x]
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - name: serverless deploy
      uses: serverless/github-action@v3
      with:
        args: deploy
      env:
        SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
        # or if using AWS credentials directly
        # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Serverless v1.x

Change serverless/github-action@master to serverless/github-action@v1

Serverless v2.x

Change serverless/github-action@master to serverless/github-action@v2

Usage with plugins

See example in this issue

License

The Dockerfile and associated scripts and documentation in this project are released under the Apache-2 license.