title | description | ms.date | monikerRange |
---|---|---|---|
AzureStaticWebApp@0 - Deploy Azure Static Web App v0 task |
Build and deploy an Azure Static Web App. |
05/14/2024 |
>=azure-pipelines-2022 |
:::moniker range=">=azure-pipelines-2022"
This task builds and deploys an Azure Static Web app.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
# Deploy Azure Static Web App v0
# Build and deploy an Azure Static Web App.
- task: AzureStaticWebApp@0
inputs:
#workingDirectory: '$(System.DefaultWorkingDirectory)' # string. Alias: cwd | rootDirectory. Working directory. Default: $(System.DefaultWorkingDirectory).
#app_location: # string. App location.
#app_build_command: # string. App build command.
#output_location: # string. Output location.
#api_location: # string. Api location.
#api_build_command: # string. Api build command.
#routes_location: # string. Routes location.
#config_file_location: # string. Config file location.
#skip_app_build: # boolean. Skip app build.
#skip_api_build: # boolean. Skip api build.
#is_static_export: # boolean. Set static export.
#verbose: # boolean. Verbose.
#build_timeout_in_minutes: # string. Build timeout in minutes.
#azure_static_web_apps_api_token: # string. Azure Static Web Apps api token.
#deployment_environment: # string. Deployment Environment.
#production_branch: # string. Production Branch.
#data_api_location: # string. Data api location.
:::moniker-end
:::moniker range="=azure-pipelines-2022"
# Deploy Azure Static Web App v0
# Build and deploy an Azure Static Web App.
- task: AzureStaticWebApp@0
inputs:
#workingDirectory: '$(System.DefaultWorkingDirectory)' # string. Alias: cwd | rootDirectory. Working directory. Default: $(System.DefaultWorkingDirectory).
#app_location: # string. App location.
#app_build_command: # string. App build command.
#output_location: # string. Output location.
#api_location: # string. Api location.
#api_build_command: # string. Api build command.
#routes_location: # string. Routes location.
#config_file_location: # string. Config file location.
#skip_app_build: # boolean. Skip app build.
#skip_api_build: # boolean. Skip api build.
#is_static_export: # boolean. Set static export.
#verbose: # boolean. Verbose.
#build_timeout_in_minutes: # string. Build timeout in minutes.
#azure_static_web_apps_api_token: # string. Azure Static Web Apps api token.
#deployment_environment: # string. Deployment Environment.
#production_branch: # string. Production Branch.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
workingDirectory
- Working directory
Input alias: cwd | rootDirectory
. string
. Default value: $(System.DefaultWorkingDirectory)
.
Specifies the absolute working directory in which to execute this task. If left empty, the default working directory is used.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
app_location
- App location
string
.
The directory location of the application source code, relative to the working directory.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
app_build_command
- App build command
string
.
The custom command used to run Oryx when building application source code.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
output_location
- Output location
string
.
The directory location of the compiled application code after building is complete, relative to the working directory.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
api_location
- Api location
string
.
The directory location of the Azure Functions source code, relative to the working directory.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
api_build_command
- Api build command
string
.
The custom command used to run Oryx when building Azure Functions source code.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
routes_location
- Routes location
string
.
The directory location of the routes.json file, relative to the working directory.
Note: Routes.json is deprecated. Use staticwebapp.config.json.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
config_file_location
- Config file location
string
.
The directory location of the staticwebapp.config.json file, relative to the working directory.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
skip_app_build
- Skip app build
boolean
.
Skips Oryx build for the app folder.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
skip_api_build
- Skip api build
boolean
.
Skips Oryx build for the API folder.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
is_static_export
- Set static export
boolean
.
Set this flag to true
when your application is configured to export to static HTML, like when using next export
.
When this flag is set to true
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
verbose
- Verbose
boolean
.
Enables verbose logging.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
build_timeout_in_minutes
- Build timeout in minutes
string
.
Specifies the time limit of the Oryx app folder build in minutes.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
azure_static_web_apps_api_token
- Azure Static Web Apps api token
string
.
Specifies the API token for deployment.
Note: Not required if passed as an environment variable.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
deployment_environment
- Deployment Environment
string
.
Specifies the environment to deploy to. Leave blank for the production environment. This input takes precedence over the production branch.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
production_branch
- Production Branch
string
.
Specifies the production branch. When defined, and the deployment environment is empty, deployments from other branches will be preview environments.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
data_api_location
- Data api location
string
.
Directory location of the Data API source files relative to working directory.
:::moniker-end
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
:::moniker range=">=azure-pipelines-2022"
None.
:::moniker-end
Note
This task only runs on Linux agents.
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
submodules: true
- task: AzureStaticWebApp@0
inputs:
app_location: '/build'
api_location: 'api'
output_location: '/output'
azure_static_web_apps_api_token: $(deployment_token)
:::moniker range=">=azure-pipelines-2022"
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent, DeploymentGroup |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | 1.95.0 or greater |
Task category | Utility |
:::moniker-end