Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy github action #13

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7.6']
ruby-version: ['3.2.2']

steps:
- uses: actions/checkout@v3
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/serverless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to development
# on: [workflow_dispatch]
on:
pull_request:
branches: [ "main" ]
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g serverless
- run: npm ci
- run: sls deploy
env:
ROLLBAR_ACCESS_TOKEN: token
# 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 }}
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
source 'https://rubygems.org'

ruby '~> 2.7.6'

gem 'aws-sdk-s3'
gem 'mail'
gem 'rubyzip'
Expand Down
133 changes: 64 additions & 69 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,39 @@ GIT
GEM
remote: https://rubygems.org/
specs:
aws-eventstream (1.0.3)
aws-partitions (1.207.0)
aws-sdk-core (3.65.1)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1.0)
aws-eventstream (1.3.0)
aws-partitions (1.857.0)
aws-sdk-core (3.188.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.73.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.24.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.47.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-s3 (1.140.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2)
bundler-audit (0.6.1)
aws-sigv4 (~> 1.6)
aws-sigv4 (1.7.0)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
thor (~> 1.0)
coderay (1.1.3)
colorize (0.8.1)
diff-lcs (1.3)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
date (3.3.4)
diff-lcs (1.5.0)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
fasterer (0.9.0)
colorize (~> 0.7)
ruby_parser (>= 3.14.1)
ffi (1.15.5)
faraday-net_http (3.0.2)
fasterer (0.11.0)
ruby_parser (>= 3.19.1)
ffi (1.16.3)
formatador (1.1.0)
guard (2.18.0)
guard (2.18.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
Expand All @@ -70,19 +56,30 @@ GEM
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
jmespath (1.6.1)
jmespath (1.6.2)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
mail (2.7.1)
lumberjack (1.2.10)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
method_source (1.0.0)
mini_mime (1.0.2)
mini_portile2 (2.8.2)
multipart-post (2.1.1)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
nenv (0.3.0)
nokogiri (1.15.2)
net-imap (0.4.6)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0)
net-protocol
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
notiffany (0.1.3)
Expand All @@ -91,38 +88,39 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.6.2)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rollbar (3.3.0)
rollbar (3.4.1)
roo-xls (1.2.0)
nokogiri
roo (>= 2.0.0, < 3)
spreadsheet (> 0.9.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.2)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.4)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.1)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.2)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
ruby-ole (1.2.12.2)
ruby2_keywords (0.0.5)
ruby_parser (3.18.1)
ruby_parser (3.20.3)
sexp_processor (~> 4.16)
rubyzip (2.0.0)
sexp_processor (4.16.0)
rubyzip (2.3.2)
sexp_processor (4.17.0)
shellany (0.0.1)
spreadsheet (1.3.0)
ruby-ole
thor (0.20.3)
thor (1.3.0)
timeout (0.4.1)

PLATFORMS
ruby
Expand All @@ -140,8 +138,5 @@ DEPENDENCIES
rspec
rubyzip

RUBY VERSION
ruby 2.7.6p219

BUNDLED WITH
2.4.7
2.4.22
5 changes: 3 additions & 2 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ custom:

provider:
name: aws
runtime: ruby2.7
profile: serverless
runtime: ruby3.2
# profile: serverless
region: eu-west-2
stage: ${opt:stage, 'development'}
environment:
Expand All @@ -35,6 +35,7 @@ provider:
AMR_DATA_BUCKET: ${self:custom.buckets.amr_data_bucket}
UNPROCESSABLE_BUCKET: ${self:custom.buckets.unprocessable_bucket}
ROLLBAR_ACCESS_TOKEN: ${env:ROLLBAR_ACCESS_TOKEN}
# this allows bundler to pick up gems in the ruby layer given that it appears as /opt/ruby/3.2.0
BUNDLE_PATH: /opt
iam:
role:
Expand Down
Loading