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 section for alternative deployment strategies you can use to showcase your updates.
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.
Deployments to Azure Web Apps are automated through GitHub Actions, forming an integral part of our Continuous Integration/Continuous Deployment (CI/CD) process. The CI/CD pipeline is configured to automatically trigger deployments upon merging changes into either the staging or release branches.
[!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.
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.
Stride, repository stride-docs and branch staging[!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
FalseorTruedepending on the specific requirements of your deployment. For instance, Stride Docs deployment retains files from previous deployments, allowing multiple versions like4.2,4.1, etc., to be maintained. Adjust this setting based on your deployment needs.
Http version to 2.0Ftp state to FTPS onlyHTTPS Only to OnThe 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:
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:
on:
# push:
# branches:
# - staging
workflow_dispatch:
Open the stride-docs-staging-azure.yml workflow and update it with the values obtained in the previous step. Save your changes.
This workflow might also need to be added to the master branch if it is not already present.
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.
stride-website-github.yml: Enables manual deployment to GitHub Pages in a forked repository, primarily for showcasing updates.stride-docs-release-azure.yml: Automates deployment to production upon merging changes into the release branch, with a manual trigger option also available.stride-docs-release-fast-track-azure.yml: Provides manual deployment to production, bypassing the creation of artifacts.stride-docs-staging-azure.yml: Facilitates automatic deployment to staging when changes are merged into the staging branch, and includes a manual trigger option.stride-docs-staging-fast-track-azure.yml: Allows for manual deployment to staging, skipping the creation of artifacts.stride-website-wiki.yml: Automatically deploys to the GitHub Wiki when changes are pushed to the wiki folder in the master branch, also includes a manual trigger featureTo 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.
In your stride-docs repository:
gh-pages branch will be createdgh-pages branch with the root option and click Savehttps://[your-username].github.io/stride-docs/4.2/en
Optionally, you can add also a custom domain. This should resolve JS url related errors.
CNAME file containing your custom domain name to the gh-pages branchhttps://stride-docs.vaclavelias.com/4.2/en/ is hosted on GitHub Pages