From 0ae204747173da918773822ae55e3cc8ec0eace2 Mon Sep 17 00:00:00 2001 From: Lotte Pitcher Date: Wed, 30 Jul 2025 18:50:08 +0100 Subject: [PATCH 1/4] change v1 to v2 --- Setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Setup.md b/Setup.md index 03e6e88..f04447b 100644 --- a/Setup.md +++ b/Setup.md @@ -55,7 +55,7 @@ So you now have a working local site running the latest codebase, with no sensit ## Getting Changes Back to Cloud -We're using a GitHub Action that uses the V2 Umbraco Cloud API endpoints. +We're using a GitHub Action that uses the Cloud v2 API endpoints. In your GitHub repository go to Settings > Security > Secrets and Variables > Actions. There are two tabs, one for Secrets and one for Variables. @@ -69,7 +69,7 @@ On the Secrets tab, create the following Repository Secrets: Now do the following updates to your repository: -1. Copy the Cloud API v1 powershell scripts from [here](.github/powershell/APIv2) into the same folder location in your repo (.github\powershell\APIv2) +1. Copy the Cloud API v2 powershell scripts from [here](.github/powershell/APIv2) into the same folder location in your repo (.github\powershell\APIv2) 1. Copy all the .yml files from [here](.github/workflows) into the same folder location in your repo (.github\workflows) From b72ca15cd46bf9c044bc0f42dca40ecd9e78e97e Mon Sep 17 00:00:00 2001 From: Lotte Pitcher Date: Wed, 30 Jul 2025 18:55:25 +0100 Subject: [PATCH 2/4] tweak to setup instructions --- Setup.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Setup.md b/Setup.md index f04447b..ab875cc 100644 --- a/Setup.md +++ b/Setup.md @@ -73,15 +73,15 @@ Now do the following updates to your repository: 1. Copy all the .yml files from [here](.github/workflows) into the same folder location in your repo (.github\workflows) -1. Update the `cloud-artifact` job in `main-v2.yml`: +1. Update the 'cloud-artifact' job in `main-v2.yml`: - Set the `pathToWebsite` parameter - Set the `csProjFile` parameter - Set the `pathToFrontendClient` parameter (see ** Note below) -1. Update the `cloud-deployment` job in `main-v2.yml`: +1. Update the 'cloud-deployment' job in `main-v2.yml`: - - Set the `targetEnvironmentAlias` to the left-most main environment alias (check this in the Cloud Portal > Configuration > Advanced > Umbraco CI/CD Flow > CI/CD Environment Targets). Of course you may prefer to switch to use a Repository variable here. + - Set the `targetEnvironmentAlias` to alias of you left-most main environment (check this in the Cloud Portal > Configuration > Advanced > Umbraco CI/CD Flow > CI/CD Environment Targets). Of course you may prefer to use a Repository variable instead. 1. In the root of your repository add the `cloud.zipignore` file that you can copy from [here](cloud.zipignore) @@ -90,7 +90,7 @@ Now do the following updates to your repository: 1. Edit `cloud.gitignore` and remove the “CUSTOM rules” section that you added earlier > [!NOTE] -> ** If you do NOT have a separate project which needs a npm build task then delete the `pathToFrontendClient` line, and update `cloud-artifact.yml` and delete the `Setup Node.js` and `Build frontend assets` steps. +> ** If you do NOT have a separate project which needs a npm build task then delete the entire `pathToFrontendClient` line, then update `cloud-artifact.yml` and delete the steps called 'Setup Node.js' and 'Build frontend assets'. Now you have a GitHub Action that will push to Cloud whenever the `main` branch is updated, or when it’s manually triggered (via the GitHub website Actions tab). From 164b5b56f31721006b40fb6e145c4ea245fe699a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 31 Jul 2025 13:34:28 +0200 Subject: [PATCH 3/4] test deploy --- src/OpenSourceTest.Site/Views/master.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenSourceTest.Site/Views/master.cshtml b/src/OpenSourceTest.Site/Views/master.cshtml index 92a2c1e..0e4cb9d 100644 --- a/src/OpenSourceTest.Site/Views/master.cshtml +++ b/src/OpenSourceTest.Site/Views/master.cshtml @@ -14,7 +14,7 @@

- Master template last updated: 2025-07-30 17:47 UTC + Master template last updated: 2025-07-31 13:34 CEST

From 5b2c454fd87ad3b38ce406a2ab7c5685e4ed167e Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 8 Aug 2025 10:32:28 +0200 Subject: [PATCH 4/4] Skip the build & restore, Cloud will just repeat it again This step could be useful to make sure that we didn't commit any code that doesn't build, but since Cloud is also running it, we don't need to run it again, it wastes resources and time. --- .github/workflows/main-v2.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-v2.yml b/.github/workflows/main-v2.yml index a2f8ff0..a820eff 100644 --- a/.github/workflows/main-v2.yml +++ b/.github/workflows/main-v2.yml @@ -30,6 +30,8 @@ jobs: with: artifactId: ${{ needs.cloud-artifact.outputs.artifactId }} targetEnvironmentAlias: stage + noBuildAndRestore: 1 secrets: projectId: ${{ secrets.PROJECT_ID }} - umbracoCloudApiKey: ${{ secrets.UMBRACO_CLOUD_API_KEY }} \ No newline at end of file + + umbracoCloudApiKey: ${{ secrets.UMBRACO_CLOUD_API_KEY }}