Open Official-James opened 6 months ago
https://github.com/Azure/static-web-apps/issues/1342
This is the same issue, but I don't understand the fix
I obtained a token by going to the SWA and choosing "Manage deployment token" on the "Overview" page.
This token is then created as a Dependabot specific secret WITH THE SAME NAME as the normal token per https://github.com/Azure/static-web-apps/issues/788
I don't think this is truly a duplicate because this issue exists in the action as created by the wizard for creating a SWA, where as the linked issues I believe relate to actions people manually created.
I tried taking the token from Azure Portal, adding it as a Dependabot secret with the name AZURE_STATIC_WEB_APPS_API_TOKEN
and setting it in the Close Pull Request Job
name: Close Pull Request Job
steps:
- name: Close Pull Request
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
action: "close"
with no success, I get the same error deployment_token was not provided.
I have a manually created pipeline
It worked for me by setting the token as a normal repository secret, as described here
Describe the bug
Using the azure/static-web-apps-deploy GitHub Action, on closed PR action the following error appears:
This is preventing cleanup of the preview environments in the Static Web App.
To Reproduce Steps to reproduce the behavior:
Add the following as a job in GitHub Actions:
Expected behavior PR to trigger on close and clean-up the preview environment