0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

vue vite azure static web app 静的サイト github actionsで自動デプロイ monorepo

Posted at

備忘録的に
ハマったところ

Monorepositoryで作成していたためディレクトリの設定で躓く

GitHub Actions内で

workflow.yml
---
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLACK_FIELD_03150D510 }}
          repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
          action: "upload"
          ###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
          # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
          app_location: "/client/project-files" # App source code path
          api_location: "" # Api source code path - optional
          output_location: "docs" # Built app content directory - optional
          ###### End of Repository/Build Configurations ######
---

また、vueプロジェクト内で(vite)でビルド後のフォルダの設定

vite.config.ts
export default defineConfig({
  base:'./',
  build: {
    outDir: 'docs',
 },

どちらもを合わせる必要がある。

それまでは、こういうエラーが出ていた。
The app build failed to produce artifact folder: '../docs/'. Please ensure this property is configured correctly in your workflow file.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?