-
Notifications
You must be signed in to change notification settings - Fork 3
Production deployment (Azure)
Benjamin edited this page Dec 30, 2022
·
4 revisions
The grottocenter front web application (under packages/web-app) is deployed on Microsoft Azure Static Web Apps.
Azure Static Web Apps is serving the static files generated by the yarn build task, which are located under packages/web-app/build.
On every push to the develop branch the Github Actions workflow to deploy the latest code will run automatically.
Later we should switch to the master branch instead of the develop branch to deploy less often and a more stable code |
|---|
You can test the static app generated by yarn build before deploying it to Azure locally
npm install -g serve
cd packages/web-app
serve -s build
using the following az command line (need to be run only 1 time) :
az staticwebapp create \
-n grottocenter-front \
-g Grottocenter \
-s https://github.com/GrottoCenter/grottocenter-front \
-l WestEurope \
-b develop \
--app-location . \
--api-location /api \
--output-location packages/web-app/build \
--token GITHUB_TOKEN_WITH_WORKFLOW_ACCESS \
--debug
| DANGER ZONE |
|---|
| You can delete the static web app with : |
az staticwebapp delete \
--name grottocenter-front \
--resource-group Grottocenter
Deployment process inspired by https://docs.microsoft.com/fr-fr/azure/static-web-apps/get-started-cli?tabs=react
- install azure CLI -> https://docs.microsoft.com/fr-fr/cli/azure/install-azure-cli
A Github action will also automatically deploy up to 3 Pull Request of the Grottocenter front on Azure Static Web Apps.