【发布时间】:2020-07-30 11:30:40
【问题描述】:
我正在尝试将基本的 Angular 9 应用程序部署到 azure 应用服务。
到目前为止我做了什么。
- 然后我按照启动网站的建议去了部署中心,并通过部署中心连接了我的 github 存储库
- 它将此工作流 yml 文件添加到我的存储库中,我确实注释掉了 npm run test,因为它是 angular 的默认应用程序,无需浪费时间运行应用程序
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Node.js app to Azure Web App - someapp
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: npm install, build, and test
run: |
npm install
npm run build -prod --if-present
# npm run test --if-present
- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v1
with:
app-name: 'someapp'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile}}
package: .
- 在运行管道后,它会在初始获取时给出一个 503 错误代码的应用程序错误。
我尝试通过 ssh 进入服务器查看文件结构,但要么我无法登录,要么如果我登录了它,几秒钟后我就会退出。
有谁知道我是否错过了部署到 azure 或文件结构所需的某些步骤? 我尝试搜索更多最新的教程或问题,但大多数似乎都过时了。
【问题讨论】:
标签: angular azure github deployment http-status-code-503