-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.09 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy
on:
push:
branches:
- main
concurrency:
group: 'main-deploy'
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
lambdas:
- 'lambdas/**'
rails:
- '!lambdas/**'
- name: Deploy Lambdas
if: steps.filter.outputs.lambdas == 'true'
uses: serverless/[email protected]
with:
args: -c "cd ./lambdas && make zip && serverless deploy"
entrypoint: /bin/sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy Rails app to dokku
if: steps.filter.outputs.rails == 'true'
uses: dokku/github-action@master
with:
git_remote_url: ${{ secrets.SSH_HOST }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
branch: main