Skip to content

Instantly share code, notes, and snippets.

@sobstel
Created October 1, 2020 16:27
Show Gist options
  • Select an option

  • Save sobstel/df38c7a45f360b80272e82a8bb592e45 to your computer and use it in GitHub Desktop.

Select an option

Save sobstel/df38c7a45f360b80272e82a8bb592e45 to your computer and use it in GitHub Desktop.

Revisions

  1. sobstel created this gist Oct 1, 2020.
    27 changes: 27 additions & 0 deletions deploy.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    on:
    push:
    branches:
    - "master"

    jobs:
    deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
    - uses: actions/cache@v2
    with:
    path: vendor/bundle
    key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
    - name: Build gems for AWS Lambda
    run: |
    bundle config set --local deployment 'true'
    bundle config set --local without 'development'
    docker run --rm -v "$PWD":/var/task lambci/lambda:build-ruby2.7 bundle install --jobs 4 --retry 3
    - name: Deploy to AWS Lambda
    uses: serverless/github-action@master
    with:
    args: deploy
    env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}