diff --git a/.github/workflows/sls.yml b/.github/workflows/sls.yml index dceadcb..39b7994 100644 --- a/.github/workflows/sls.yml +++ b/.github/workflows/sls.yml @@ -1,4 +1,4 @@ -name: Deploy master branch +name: 🚀 Deploy Serverless (fastapi) on: push: @@ -12,33 +12,31 @@ jobs: name: Deploy runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.20.3] - steps: - - uses: actions/checkout@v3 + - name: 📥 Checkout code + uses: actions/checkout@v3 - - name: Set up Node.js ${{ matrix.node-version }} + - name: 🛠️ Set up Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 18.20.3 - - name: Set up Python 3.9 + - name: 🐍 Set up Python 3.9 uses: actions/setup-python@v4 with: python-version: '3.9' - - name: Install Serverless Framework v3.38.0 globally + - name: 📦 Install Serverless Framework v3.38.0 globally run: npm install -g serverless@3.38.0 - - name: Install serverless-python-requirements globally + - name: 🧩 Install serverless-python-requirements globally run: serverless plugin install --name serverless-python-requirements - - run: npm ci + - name: 📦 Install Node.js dependencies + run: npm ci # Ensure Serverless plugin for Python requirements is installed and deploy - - name: Serverless deploy + - name: 🚀 Serverless deploy run: serverless deploy env: # To link with your Serverless Framework account, equivalent to login diff --git a/fastapi_project/api/root_index.py b/fastapi_project/api/root_index.py index 9f77c39..5d249c1 100755 --- a/fastapi_project/api/root_index.py +++ b/fastapi_project/api/root_index.py @@ -8,7 +8,7 @@ @router.get("/") async def root_index(request: Request): data = { - 'message': 'aws lamda function is running...' + 'message': 'aws lamda function is running....' } return JSONResponse(content=data, status_code=status.HTTP_200_OK) \ No newline at end of file