|
@@ -1,16 +1,17 @@
|
|
|
-# Deployment in Azure
|
|
|
|
|
-- [Step-by-Step Guide to Deploying Azure Web Apps (Windows) with IIS](#step-by-step-guide-to-deploying-azure-web-apps-windows-with-iis)
|
|
|
|
|
- - [Setting up a new Azure Web App (Windows) with IIS](#setting-up-a-new-azure-web-app-windows-with-iis)
|
|
|
|
|
- - [Adjusting the Web App Configuration](#adjusting-the-web-app-configuration)
|
|
|
|
|
- - [Modifying the GitHub Action](#modifying-the-github-action)
|
|
|
|
|
|
|
+# Deployment
|
|
|
|
|
|
|
|
-# Step-by-Step Guide to Deploying Azure Web Apps (Windows) with IIS
|
|
|
|
|
|
|
+Our team has explored various deployment options, ultimately selecting the method detailed in this guide for its efficacy. Additionally, for demonstration purposes, you can refer to the [Deployment to GitHub Pages](deployment-azure.md#deployment-to-github-pages) section for alternative deployment strategies you can use to showcase your updates.
|
|
|
|
|
|
|
|
-This guide assumes you already have permission to access the Azure subscription.
|
|
|
|
|
|
|
+## Deploying to Azure Web Apps (Windows) with IIS
|
|
|
|
|
|
|
|
-## Setting up a new Azure Web App (Windows) with IIS
|
|
|
|
|
|
|
+This guide is crafted for individuals who already have access to the Azure subscription. It provides step-by-step instructions for setting up a new Azure Web App, specifically tailored for staging environments. Note that the process for setting up a production environment is similar, but requires a distinct web app name.
|
|
|
|
|
|
|
|
-These instructions pertain to the staging environment. For the production environment, follow the same steps, but with a different web app name.
|
|
|
|
|
|
|
+> [!NOTE]
|
|
|
|
|
+> The deployment process outlined here is already established and running, hosted on Azure and sponsored by the .NET Foundation. This guide serves primarily as a reference for maintainers in the event that a new deployment setup is required.
|
|
|
|
|
+
|
|
|
|
|
+### Setting up a new Azure Web App
|
|
|
|
|
+
|
|
|
|
|
+Follow these instructions carefully to establish your Azure Web App in a staging environment. For deploying in a production environment, replicate these steps with an alternate web app name for differentiation.
|
|
|
|
|
|
|
|
1. Navigate to the [Azure Portal](https://portal.azure.com/)
|
|
1. Navigate to the [Azure Portal](https://portal.azure.com/)
|
|
|
1. Select **Create a resource**
|
|
1. Select **Create a resource**
|
|
@@ -18,7 +19,7 @@ These instructions pertain to the staging environment. For the production enviro
|
|
|
1. In the Basic Tab
|
|
1. In the Basic Tab
|
|
|
- Choose your existing subscription and resource group
|
|
- Choose your existing subscription and resource group
|
|
|
- Under Instance Details, enter:
|
|
- Under Instance Details, enter:
|
|
|
- - Name: **stride-website-staging**
|
|
|
|
|
|
|
+ - Name: **stride-docs-staging**
|
|
|
- Publish: **Code**
|
|
- Publish: **Code**
|
|
|
- Runtime stack: **ASP.NET V4.8**
|
|
- Runtime stack: **ASP.NET V4.8**
|
|
|
- OS: **Windows**
|
|
- OS: **Windows**
|
|
@@ -27,7 +28,7 @@ These instructions pertain to the staging environment. For the production enviro
|
|
|
- Click **Next**
|
|
- Click **Next**
|
|
|
1. In the Deployment Tab - This step can be completed later if preferred.
|
|
1. In the Deployment Tab - This step can be completed later if preferred.
|
|
|
- Enable Continuous deployment
|
|
- Enable Continuous deployment
|
|
|
- - Select account, organisation `Stride`, repository `stride-website` and branch `staging-next`
|
|
|
|
|
|
|
+ - Select account, organisation `Stride`, repository `stride-docs` and branch `staging`
|
|
|
- Click **Next**
|
|
- Click **Next**
|
|
|
1. In the Monitoring Tab
|
|
1. In the Monitoring Tab
|
|
|
- Leave all settings as default
|
|
- Leave all settings as default
|
|
@@ -43,30 +44,57 @@ These instructions pertain to the staging environment. For the production enviro
|
|
|
- Click **Create**
|
|
- Click **Create**
|
|
|
- The GitHub Action will be added to the repository and run automatically. It will fail at this stage, but this will be resolved in the subsequent steps.
|
|
- The GitHub Action will be added to the repository and run automatically. It will fail at this stage, but this will be resolved in the subsequent steps.
|
|
|
|
|
|
|
|
-## Adjusting the Web App Configuration
|
|
|
|
|
|
|
+> [!CAUTION]
|
|
|
|
|
+> If you have completed the **Deployment Tab** process, ensure that the deployment profile includes the **DeleteExistingFiles** property. This property may need to be set to `False` or `True` depending on the specific requirements of your deployment. For instance, Stride Docs deployment retains files from previous deployments, allowing multiple versions like `4.2`, `4.1`, etc., to be maintained. Adjust this setting based on your deployment needs.
|
|
|
|
|
+
|
|
|
|
|
+### Adjusting the Web App Configuration
|
|
|
|
|
|
|
|
1. Proceed to the newly created Web App
|
|
1. Proceed to the newly created Web App
|
|
|
1. Click on **Configuration**
|
|
1. Click on **Configuration**
|
|
|
1. Select **General Settings**
|
|
1. Select **General Settings**
|
|
|
-1. Change the Http Version to **2.0**
|
|
|
|
|
|
|
+1. Change the `Http version` to **2.0**
|
|
|
|
|
+1. Change `Ftp state` to **FTPS only**
|
|
|
|
|
+1. Change `HTTPS Only` to **On**
|
|
|
1. Click **Save** to apply the changes
|
|
1. Click **Save** to apply the changes
|
|
|
|
|
|
|
|
-## Modifying the GitHub Action
|
|
|
|
|
|
|
+### Modifying the GitHub Action
|
|
|
|
|
|
|
|
-The previous step will have added a GitHub Action to the repository, which will fail at this point. You need to modify the GitHub Action to correct the issue.
|
|
|
|
|
|
|
+The previous step will have added a GitHub Action to your repository, which might fail initially. To address this, you need to modify the GitHub Action:
|
|
|
|
|
|
|
|
1. Navigate to the repository
|
|
1. Navigate to the repository
|
|
|
-1. Select Actions
|
|
|
|
|
|
|
+1. Select **Actions**
|
|
|
1. You have the option to stop the currently running action
|
|
1. You have the option to stop the currently running action
|
|
|
-1. Locate the new GitHub Action *(within this folder Stride Website -> staging-next repo -> .github -> workflows)* which was automatically generated by the Azure Portal. We will need to reference the properties app-name and publish-profile and disable the push trigger.
|
|
|
|
|
|
|
+1. Locate the new GitHub Action file *(stride-docs/blob/master/.github/workflows/some-file-name.yml)* that was automatically generated by Azure Portal. We need to extract the `app-name` and `publish-profile` values from it and disable the push trigger.
|
|
|
- To disable the push trigger, retain only **workflow_dispatch** (manual trigger) as shown below:
|
|
- To disable the push trigger, retain only **workflow_dispatch** (manual trigger) as shown below:
|
|
|
```
|
|
```
|
|
|
on:
|
|
on:
|
|
|
# push:
|
|
# push:
|
|
|
# branches:
|
|
# branches:
|
|
|
- # - staging-next
|
|
|
|
|
|
|
+ # - staging
|
|
|
workflow_dispatch:
|
|
workflow_dispatch:
|
|
|
```
|
|
```
|
|
|
-1. Open the `stride-website-staging-azure.yml` workflow and update it with the properties from the previous step. Save your changes.
|
|
|
|
|
-1. This workflow may also need to be added to the production branch master if it is not already there.
|
|
|
|
|
-1. Execute the workflow stride-website-staging-azure.yml. Ensure you select the correct branch staging-next and click **Run workflow**. This action will deploy the website to the Azure Web App.
|
|
|
|
|
|
|
+1. Open the `stride-docs-staging-azure.yml` workflow and update it with the values obtained in the previous step. Save your changes.
|
|
|
|
|
+1. This workflow might also need to be added to the `master` branch if it is not already present.
|
|
|
|
|
+1. Execute the workflow `stride-docs-staging-azure.yml`. Ensure you select the correct branch `staging` and click **Run workflow**. This action will deploy the website to the Azure Web App.
|
|
|
|
|
+
|
|
|
|
|
+## Deployment to GitHub Pages
|
|
|
|
|
+
|
|
|
|
|
+To showcase your updates, especially helpful for design changes pending review, you can deploy the docs website either to your infrastructure or to GitHub Pages, a free hosting service. Once deployed, share the link with us for review.
|
|
|
|
|
+
|
|
|
|
|
+### Prerequisites
|
|
|
|
|
+
|
|
|
|
|
+In your `stride-docs` repository:
|
|
|
|
|
+
|
|
|
|
|
+1. Navigate to **Settings** → **Actions** → **General** → **Workflow Permissions**
|
|
|
|
|
+ - Choose **Read and write permissions**
|
|
|
|
|
+
|
|
|
|
|
+### Run GitHub Action
|
|
|
|
|
+
|
|
|
|
|
+1. Go to **Actions**, select **Build Stride Web for GitHub Staging**
|
|
|
|
|
+ - Click **Run workflow**; you may optionally select a branch
|
|
|
|
|
+2. Monitor the build logs while the action is in progress
|
|
|
|
|
+3. Upon successful build, a `gh-pages` branch will be created
|
|
|
|
|
+4. Navigate to **Settings** → **Pages**
|
|
|
|
|
+ - Choose the `gh-pages` branch with the root option and click **Save**
|
|
|
|
|
+5. After saving, an internal GitHub Action **pages build and deployment** is automatically created and triggered, deploying the content to the GitHub Pages website
|
|
|
|
|
+6. The website will be accessible at `https://[your-username].github.io/stride-docs`
|