-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.27 KB
/
serverless-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
# Github action to deploy serverless app
name: Deploy service to AWS using serverless framework
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ vars.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '19.x'
- name: Install serverless framework
run: npm install -g serverless
- name: Install node dependencies
run: npm ci
- name: Install python3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Package and deploy
run: |
serverless deploy \
--region ${{ vars.AWS_REGION }} \
--stage ${{ vars.SLSSTAGE }} \
--verbose
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ vars.TELEGRAM_CHAT_ID }}
MESSAGES_SIGNATURE: ${{ vars.MESSAGES_SIGNATURE }}