Make frontend build conditional on dev environment (skip in CI)
ci / backend (push) Failing after 1s
ci / static (push) Failing after 12s
Build & Test with Secrets / build (push) Failing after 1s
Build & Test with Secrets / security-scan (push) Has been cancelled
Build & Test with Secrets / notification (push) Has been cancelled
Build & Test with Secrets / frontend (push) Has been cancelled
ci / publish (push) Has been cancelled
ci / frontend (push) Has been cancelled
deploy / deploy (push) Successful in 1m44s
deploy / notify (push) Successful in 1s
ci / backend (push) Failing after 1s
ci / static (push) Failing after 12s
Build & Test with Secrets / build (push) Failing after 1s
Build & Test with Secrets / security-scan (push) Has been cancelled
Build & Test with Secrets / notification (push) Has been cancelled
Build & Test with Secrets / frontend (push) Has been cancelled
ci / publish (push) Has been cancelled
ci / frontend (push) Has been cancelled
deploy / deploy (push) Successful in 1m44s
deploy / notify (push) Successful in 1s
The BuildFrontend target now only runs when CI != true and package.json exists. This allows CI to skip pnpm install/build when it's not available. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
<UserSecretsId>bab7e095-067e-4797-b2ab-df4c1f8b447d</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Frontend Build Target: Automatically build Vite and copy to wwwroot -->
|
||||
<Target Name="BuildFrontend" BeforeTargets="Build">
|
||||
<!-- Frontend Build Target: Automatically build Vite and copy to wwwroot (dev only) -->
|
||||
<Target Name="BuildFrontend" BeforeTargets="Build" Condition="'$(CI)' != 'true' AND Exists('$(ProjectDir)../../frontend/package.json')">
|
||||
<Exec Command="pnpm install --frozen-lockfile" WorkingDirectory="$(ProjectDir)../../frontend" ContinueOnError="false" />
|
||||
<Exec Command="pnpm build" WorkingDirectory="$(ProjectDir)../../frontend" ContinueOnError="false" />
|
||||
<Copy SourceFiles="@(FrontendFiles)" DestinationFolder="$(ProjectDir)wwwroot/%(RecursiveDir)" />
|
||||
|
||||
Reference in New Issue
Block a user