-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.03 KB
/
deploy.yml
File metadata and controls
33 lines (32 loc) · 1.03 KB
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
#
# Github Actions for Serverless Framework
#
# Create AWS_KEY and AWS_SECRET secrets in Github repository settings
#
# Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD
#
# Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/
#
name: Deploy Dev
on:
push:
branches:
- master
jobs:
deploy-dev:
runs-on: ubuntu-latest
environment: development
env:
ENV: dev
REGION: af-south-1
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: ⚙️ Install dependencies
run: npm install -g serverless && yarn install --production
- name: 🔑 Configure access credentials
run: sls config credentials --provider aws --key ${{ secrets.AWS_KEY }} --secret ${{ secrets.AWS_SECRET }}
- name: 🚀 Deploy microservice
run: sls deploy -s ${{ env.ENV }} --region ${{ env.REGION }}