具有 Git 操作的 Azure 静态 Web 应用程序 [Git 操作错误]

问题描述 投票:0回答:1

我正在尝试使用 Azure Cloud(静态 Web 操作)托管我的个人作品集网站,但我遇到了来自 Git 操作的错误。

我的yaml文件 - https://github.com/OfficialCodeVoyage/pavlobondarenko.co/blob/pushtoazure/.github/workflows/azure-static-web-apps-lively-ocean-008ed2910.yml

repo - https://github.com/OfficialCodeVoyage/pavlobondarenko.co/tree/pushtoazure

error 1

error 2

尝试更改 .yaml 文件 删除了 dokerfile 暂时删除了 php 调用

提前谢谢您!

azure github azure-web-app-service
1个回答
0
投票

我尝试了您的代码,做了一些更改,并且能够通过 GitHub 操作将应用程序部署到 Azure 静态 Web 应用程序。

这是我的.yml 文件:

name: Azure Static Web Apps CI/CD

on:
  push:
    branches:
      - master
  pull_request:
    types: [opened, synchronize, reopened, closed]
    branches:
      - master

jobs:
  build_and_deploy_job:
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
    runs-on: ubuntu-latest
    name: Build and Deploy Job
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
          lfs: false
      - name: Build And Deploy
        id: builddeploy
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_ROCK_062CA360F }}
          repo_token: ${{ secrets.GITHUB_TOKEN }} 
          action: "upload"
          app_location: "./bg"
          api_location: ""
          output_location: "." 

  close_pull_request_job:
    if: github.event_name == 'pull_request' && github.event.action == 'closed'
    runs-on: ubuntu-latest
    name: Close Pull Request Job
    steps:
      - name: Close Pull Request
        id: closepullrequest
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_ROCK_062CA360F }}
          action: "close"

我通过 Github 部署了该应用程序。

enter image description here

这是本地输出:

enter image description here

这是部署后的输出:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.