MikaelPettersson-2350,
To target a workflow file to a single app, you specify paths in the push
and pull_request
sections.
Just to highlight, when you set up a monorepo, each static app configuration is scoped to only files for a single app. The different workflow files live side by side in the repository's .github/workflows folder.
Please take a look at the sample (below).
Also, use skip_api_build
in GitHub Actions. In order to use it, set skip_api_build: true
in the GitHub workflow yaml and specify the ApiRuntime version in the staticwebapp.config.json
file in source repository.
Sample:
on:
push:
branches:
- main
paths:
- app1/**
- api1/**
- .github/workflows/azure-static-web-apps-purple-pond.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
paths:
- app1/**
- api1/**
- .github/workflows/azure-static-web-apps-purple-pond.yml
See:
Build configuration for Azure Static Web Apps | Monorepo support
Discussion thread
Kindly let us know how it goes, I'll follow-up with you further.