I have an application in react, and I have to build and deploy it in the Static Web App… But I’m facing a problem.
The problem:
Deploying project to Azure Static Web Apps...
Could not find StaticSitesClient local binary
- Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.026911/linux/[email protected]
[swa] ✔ Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.026911/linux/[email protected]
- Preparing deployment. Please wait...
✖App Directory Location: '/home/vsts/work/1/a/####.zip' is invalid. Could not detect this directory. Please verify your deployment configuration file reflects your repository structure.
The part of the code that is causing the problem:
- task: Bash@3
inputs:
targetType: inline
script: |
npm install -g @azure/static-web-apps-cli
swa deploy $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip --app-name $(STATIC_WEB_APP_NAME) --resource-group $(TFSTATE_RESOURCE_GROUP_NAME) --deployment-token $(STATICWEBAPP_DEPLOYMENT_TOKEN)
displayName: 'Deploy to Azure Static Web App'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)/FrontEnd/dist'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
displayName: 'Archive files'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'staticAppArtifact'
displayName: 'Publish Artifact'
code where I created it I create the artifact:
Can you help me
I tried several ways to solve it without success