Skip to content

Commit 01f631d

Browse files
committed
github action
1 parent 3c77aeb commit 01f631d

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/workflows/sls.yml

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy master branch
1+
name: 🚀 Deploy Serverless (fastapi)
22

33
on:
44
push:
@@ -12,33 +12,31 @@ jobs:
1212
name: Deploy
1313
runs-on: ubuntu-latest
1414

15-
strategy:
16-
matrix:
17-
node-version: [18.20.3]
18-
1915
steps:
20-
- uses: actions/checkout@v3
16+
- name: 📥 Checkout code
17+
uses: actions/checkout@v3
2118

22-
- name: Set up Node.js ${{ matrix.node-version }}
19+
- name: 🛠️ Set up Node.js ${{ matrix.node-version }}
2320
uses: actions/setup-node@v3
2421
with:
25-
node-version: ${{ matrix.node-version }}
22+
node-version: 18.20.3
2623

27-
- name: Set up Python 3.9
24+
- name: 🐍 Set up Python 3.9
2825
uses: actions/setup-python@v4
2926
with:
3027
python-version: '3.9'
3128

32-
- name: Install Serverless Framework v3.38.0 globally
29+
- name: 📦 Install Serverless Framework v3.38.0 globally
3330
run: npm install -g [email protected]
3431

35-
- name: Install serverless-python-requirements globally
32+
- name: 🧩 Install serverless-python-requirements globally
3633
run: serverless plugin install --name serverless-python-requirements
3734

38-
- run: npm ci
35+
- name: 📦 Install Node.js dependencies
36+
run: npm ci
3937

4038
# Ensure Serverless plugin for Python requirements is installed and deploy
41-
- name: Serverless deploy
39+
- name: 🚀 Serverless deploy
4240
run: serverless deploy
4341
env:
4442
# To link with your Serverless Framework account, equivalent to login

fastapi_project/api/root_index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@router.get("/")
99
async def root_index(request: Request):
1010
data = {
11-
'message': 'aws lamda function is running...'
11+
'message': 'aws lamda function is running....'
1212
}
1313
return JSONResponse(content=data, status_code=status.HTTP_200_OK)
1414

0 commit comments

Comments
 (0)