- First, ensure that your repository has been created and that your code has been pushed to GitHub's Main branch.
- As a second step, go to Azure.com
- Sign In with your credentials
- Select "Static Web Apps" icon
- And select "+ Create" option.
- Enter your Static Web App's Name:
- Select your nearest Region from the drop down and authorize it with your Github Account.
- Then enter your "GitHub Username" to the "Organization"
- Choose your "Repository name" from the drop down menu.
- Select your "branch".
- And nput your Build Details by selecting Build Presets from the dropdown menu.
- Finally, hit "Review & Create" button to start deployment.✨
- First, ensure that your repository has been created and that your code has been pushed to GitHub's Master branch.
- As a second step, go to Azure.com
- Sign In with your credentials
- Select "Create a Resource"
-
Select "Create" option.
-
Select your preferable Subscription from the drop down menu:
-
Give a new name to your Resource Group according to your project/website:
- Then select Node 16 LTS for the Runtime Stack
- Choose Windows for Operating System, if you are a Windows user.
- And choose the nearest Region around you from the drop down menu.
- Go to the "Deployment" tab and Enable the options:
- Ten "Sign In with and Authorize" with your Github Account. Like this:
- Then enter your "GitHub Username" to the "Organization"
- Choose your "Repository name" from the drop down menu.
- Select your "branch".
- Now, go to the "Tag" tab and enter a "Value name" according to your Project. Like this:
- Then Hit "Review + Create" from the bottom:
-Once Deployment is completed...
-
This workflow process will consume enormous amount of time! To reduce the time consumption, we need to modify the workflow file. For that, we will cancel the current Workflow :
- Then remove the select unnecessary code, like this:
- Then select and modify the path, like this:
Original | Modified |
---|---|
- Then select and modify the filename, like this:
Original | Modified |
---|---|
- Scroll down your code a bit, modify the path and write release.zip, like this:
Original | Modified |
---|---|
- Scroll down a bit more, modify the package and write release.zip, like this:
Original | Modified |
---|---|
- Now, go to the "Actions" tab and check.
- It will take few minutes to complete the deployment.
- Onece the deployment is completed, Go back to your Azure account, and copy/open your URL to the new tab
- Finally, your website is Hosted! Congratulation!!!🎉