【问题标题】:How to deploy compiled elements Azure Web App with Appveyor?如何使用 Appveyor 部署已编译的元素 Azure Web App?
【发布时间】:2016-07-10 11:22:24
【问题描述】:

我正在使用 Appveyor 将 Web 应用程序部署到 Azure 中,但所有组件都是使用 grunt 编译的,构建成功并部署,问题不是部署 bower_components 文件夹和 grunt 生成的文件和文件夹。

我错过了 appveyor.yml 上的任何代码?

shallow_clone: true
# version format
version: 1.1.{build}
# Fix line endings in Windows. (runs before repo cloning)
init:
  - git config --global core.autocrlf true

cache:
  - packages -> **\packages.config
  - Sigma.Website\bower_components -> Sigma.Website\bower.json
  - Sigma.Website\node_modules -> Sigma.Website\package.json

install:
  - npm install -g grunt-cli  1> nul

before_build:
  - ps: .\CreateBuildTxt.ps1  
  - nuget restore
  - cmd: |
          cd Sigma.Website
          npm install
          grunt
          cd ..

build:
  publish_wap: true

#Deployment configuration
deploy:
- provider: WebDeploy
  server: https://sigma.scm.azurewebsites.net:443/msdeploy.axd?site=sigma
  website: sigma
  username: $sigma
  password:
    secure: xxxxxx
  ntlm: false
  remove_files: false 
  app_offline: false
  artifact: Sigma.Website
  on:
    branch: master

notifications:
  - provider: Slack
    incoming_webhook: xxxx
    channel: '#sigma-dev'
    on_build_success: true
    on_build_failure: true

【问题讨论】:

    标签: azure-web-app-service devops appveyor


    【解决方案1】:

    将以下BeforeBuild 目标添加到Web 应用程序的.csproj(或.vbproj):

    <Target Name="BeforeBuild">
      <ItemGroup>
        <Content Include="bower_components\**\*.*" />
      </ItemGroup>
    </Target>
    

    【讨论】:

      猜你喜欢
      • 2023-03-22
      • 2019-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多