This repository was archived by the owner on Dec 9, 2024. It is now read-only.
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
Sls deploy doesn't deploy recent changes to Azure from github actions #562
Open
Description
This is a Bug Report
Description
When I make a sls deployment to Azure by means of github actions (new functions or changes in existing ones), my changes don't get deployed (although I don't see any errors or anything weird in the logs). When I do sls deploy
locally - it all works just fine.
Here's an example of my github action:
name: Serverless Deploy to DEV
on:
push:
branches:
- main
workflow_dispatch:
jobs:
sls-deploy:
name: Deploy Serverless App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Create env file
run: |
cat > .env << EOF
${{ secrets.ENV }}
EOF
- name: Install Serverless Framework
run: npm install -g serverless
- name: npm install
run: npm install
- name: serverless deploy
uses: serverless/github-action@master
with:
args: deploy
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_DEV_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
And that's the serverless.yaml:
service: my-service
frameworkVersion: "2"
provider:
name: azure
region: West Europe
runtime: nodejs12
resourceGroup: resourceGroup
subscriptionId: subscriptionId
stage: dev
tags:
Application: Azure Infrastructure
CostCenter: A0300770
Environment: Development
apim:
apis:
- name: my-api
subscriptionRequired: false
displayName: My API
description: My API
protocols:
- https
path: /
authorization: none
cors:
allowCredentials: false
allowedOrigins:
- "*"
allowedMethods:
- GET
- POST
- PUT
- DELETE
- PATCH
allowedHeaders:
- "*"
exposeHeaders:
- "*"
plugins:
- serverless-azure-functions
- serverless-dotenv-plugin
package:
patterns:
- "!local.settings.json"
- "!.gitignore"
- "!.env"
- "!tmp/**"
- "!.git/**"
- "!.vscode/**"
functions:
# Stuff
getSwagger:
handler: src/handlers/swagger
events:
- http: true
x-azure-settings:
methods:
- get
route: v1/swagger.yaml
I've checked forums and places, and my configs don't look that very different from the examples.
Could you please kindly advice on what can be wrong and which settings (maybe in Azure) I need to look into?
Metadata
Metadata
Assignees
Labels
No labels