Aaron Sadler
Posted by:

Aaron Sadler

Category

Umbraco

In this blog post, we will be deploying to our Cloud Umbraco Hosting service using WebDeploy from GitHub Actions.

To begin you will need to download the Web Publishing profile from our control panel (SolidCP).

  1. Head to SolidCP
  2. Click the Hosting Space Menu on the left-hand side of the control panel
  3. Then click Web Sites
  4. Find the website you would like to use Web Deploy with and then click on the name
  5. Click Web Publishing on the tabs found in the centre of the control panel
  6. Enter a password and click Enable (You can skip straight to point 7 if the service is already enabled)
  7. Download the profile by clicking on the Download Publishing Profile for this website button
  8. Open the download file in Notepad or Notepad++

Next, you will need to create a folder in your GitHub repository called .github within this folder, you need to create another called workflows.

Repository root -> .github./workflows

Within the workflows folder create a new file called main.yml (or whatever you wish to call this build and release workflow).

We will use our GitHub Action called UmbHost Web Deploy specifically version 1.0.1.

Below you will find a basic starter workflow to work from:

Do not commit the workflow yet.

Working from top to bottom, you must configure a few things before running the workflow.

The first change is on line 5, change main to the branch name which you would like to use to trigger the workflow.

Highlights the branch name to change

Next, you will need to create some secrets in your repository, you can read documentation about secrets on the GitHub website here.

Browse to: Repository -> Settings -> Secrets and variables -> Actions

Repository Secrets Settings Location

Next, you will need to create the secrets which are used in the workflow, click on the New repository secret button one at a time, following the table below as a guide, you can find the values for the Publish Profile Key in the previously downloaded Publish Profile file.

Publish Profile Key Secret Name
publishUrl SERVER_COMPUTER_NAME
msdeploySite WEBSITE_NAME
userName USERNAME
userPWD PASSWORD

There are two more secrets you need to create:

SOLUTION_NAME -> This is your solution name including the .sln extension

ZIPPED_FILE_NAME -> This is your web project name replacing the .csproj with .zip, for example if your web project is called Umbraco.Web.csproj then you would enter Umbraco.Web.zip

It should look like the picture below once all the secrets have been created:

Secrets

Once the secrets have been added, you can now commit the previously created GitHub Actions file.

You can now sit back and watch the action run by clicking on the Actions tab in GitHub then on the name of the run and finally on the build link.

The workflow example used in this blog post is only a basic starter workflow, you can do so much more such as adding in your frontend build steps, making environment-specific settings and configurations and so much more.

Comments

Post a comment

Fields marked with an * (asterisk) are required


Recent Posts

News
.NET 9 Now Available

DotNet 9 Has been rolled ou...

News
Black Friday 2024 - FREE Umbraco Forms licence!

How to claim your FREE Umbr...

Umbraco
How to deploy Umbraco using Web Deploy from Azu...

How to deploy Umbraco using...

Umbraco
How to deploy Umbraco using Web Deploy from Git...

This blog post shows how yo...

Umbraco
Umbraco Medium Security Vulnerabilities - 22nd...

Security patches now availa...

ADVERTISTING
Browse Umbraco Hosting
Umbraco Hosting Starting At £10.00/month