Open sportelli opened 3 years ago
@sportelli Currently we add a comment to PRs with the preview URL, like this: https://github.com/anthonychu/20210511-vue-basic/pull/1#issuecomment-842878862
The Static Web Apps GitHub Action outputs the URL of the site (or preview URL if a PR). You can set up your own notifications: https://github.com/anthonychu/20210511-vue-basic/blob/3c773f17894c6142277490b1accbd221bd1b76eb/.github/workflows/azure-static-web-apps-wonderful-wave-0b253da10.yml#L34-L42
By setting up your own GitHub Action to send notifications, you have full control over the notification method, as well as the contents of the notification message and error handling (e.g., what to do when the build has failed). Would these solutions work?
This is a sample to use Environments.
deploy-swa:
name: Deploy to Azure Static Web Apps
runs-on: ubuntu-20.04
environment:
name: Staging
url: ${{ steps.swa-deploy.outputs.static_web_app_url }}
steps:
- name: Build and Deploy
id: swa-deploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: upload
Result is here
Being able to have auto-deployment through Github actions is great for Azure Static WebApps, but in a project lifecycle, projet's team needs to be notified that a deployment occurred and is finished:
I would advise two notifications:
In Github, being able to have the direct access to the deployment status and the deployment URL
The first notification content should be visible in Slack / Microsoft Teams, allowing the team to know which checks/deployments have started/are finished with a direct link to the generated web URL.
I'm available on Twitter (felixsportelli) if you need any more details or if you need my teams to give you more insights on how they work.
ping @anthonychu