小编Ant*_*e L的帖子

使用 github 操作进行部署时更改 appsettings 中的变量

我正在尝试使用 github 操作部署应用程序。我将我的 azure 帐户链接到我的 github 存储库,并创建了以下操作:

name: Build and deploy ASP.Net Core app to Azure Web App - my_app_name

on:
  push:
    branches:
      - master

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master

    - name: Set up .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '3.1.102'

    - name: Build with dotnet
      run: dotnet build --configuration Release

    - name: dotnet publish
      run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

    - name: Deploy to Azure Web App
      uses: azure/webapps-deploy@v1
      with:
        app-name: 'my_app_name'
        slot-name: 'production'
        publish-profile: …
Run Code Online (Sandbox Code Playgroud)

c# asp.net azure-web-app-service github-actions

10
推荐指数
1
解决办法
1973
查看次数