From 13a4247cd2b53f81dc1410ea41666ecf9293bb03 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 14:26:06 -0400 Subject: [PATCH 01/12] testing runner --- .gitignore | 1 - Themes/NewSpringNextGen/Styles/theme.css | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Themes/NewSpringNextGen/Styles/theme.css diff --git a/.gitignore b/.gitignore index 8c7c4a7..c551d6d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,5 @@ node_modules/ # Theme CSS compiled by `npm run build`. Add any other compiled file names your themes use. # (Not a blanket *.css, so hand-written .css files in a theme can still be committed.) -Themes/*/Styles/theme.css Themes/*/Styles/bootstrap.css Themes/*/Styles/checkin-theme*.css diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css new file mode 100644 index 0000000..be3a641 --- /dev/null +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -0,0 +1,7 @@ +@import "../../../Styles/summernote/summernote.min.css"; +@import "../../../Styles/styles-v2/core.css"; +@import "_css-variables.css"; + +body { + background-color: red; +} \ No newline at end of file From b5558c1f5e49b94b61d1eb0b7f5e348cd864b9eb Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 14:28:40 -0400 Subject: [PATCH 02/12] updated workflows --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a41be9..f651126 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build themes on: push: - branches: [main] + branches: [brian, beta, prod] pull_request: workflow_dispatch: workflow_call: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 61641f6..fda1c03 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,7 +5,7 @@ name: Deploy themes # register a runner with the matching label. on: push: - branches: [brian, beta, production] + branches: [brian, beta, prod] # Never run two deploys to the same environment at once; queue instead of cancelling. concurrency: @@ -18,7 +18,7 @@ jobs: deploy: needs: build - runs-on: [self-hosted, windows, "rock-${{ github.ref_name }}"] + runs-on: [self-hosted, windows, "${{ github.ref_name }}-rock"] permissions: contents: read steps: From 1f8fca5eb58ffaa7fb846fbf3ec8e0e2cd88eb18 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:03:28 -0400 Subject: [PATCH 03/12] testing deploy --- Themes/NewSpringNextGen/Styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css index be3a641..ca67f8a 100644 --- a/Themes/NewSpringNextGen/Styles/theme.css +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -3,5 +3,5 @@ @import "_css-variables.css"; body { - background-color: red; + background-color: blue; } \ No newline at end of file From 18d1d12f7c42365aff268001e1a21b74af3ab060 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:06:27 -0400 Subject: [PATCH 04/12] Deploy via self-hosted runners --- .github/workflows/deploy.yml | 4 ++-- README.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fda1c03..9adf700 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,7 @@ name: Deploy themes # One branch per environment. Each environment's VM runs a self-hosted runner labelled -# `rock-` (see README > Deploy). To add an environment, add its branch here and +# `-rock` (see README > Deploy). To add an environment, add its branch here and # register a runner with the matching label. on: push: @@ -29,7 +29,7 @@ jobs: # build\Themes\... -> \Themes\... # /E copies and overwrites but never deletes files removed from the repo. - - shell: pwsh + - shell: powershell env: DEPLOY_PATH: ${{ vars.DEPLOY_PATH || 'C:\inetpub\wwwroot' }} run: | diff --git a/README.md b/README.md index 0f2ad75..3eacee5 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Commit `package-lock.json` after your first `npm install` and switch the workflo ## Deploy -Each server environment gets its own branch (e.g. `staging`, `production`). Pushing to that +Each server environment gets its own branch (e.g. `beta`, `production`). Pushing to that branch runs `.github/workflows/deploy.yml`, which builds the themes on a GitHub-hosted runner, then deploys the artifact with robocopy from a self-hosted runner installed on that environment's VM. No manual step, and no inbound ports opened on the VM. @@ -85,11 +85,11 @@ environment's VM. No manual step, and no inbound ports opened on the VM. 1. Repo **Settings > Actions > Runners > New self-hosted runner**, choose Windows / x64, and run the download/extract commands it shows in an admin PowerShell on the VM. -2. Configure it with the label `rock-` and install it as a service: +2. Configure it with the label `-rock` and install it as a service: ```powershell - .\config.cmd --url https://github.com/NewSpring/rock-themes --token --labels rock-staging --runasservice --windowslogonaccount "DOMAIN\svc-gh-runner" + .\config.cmd --url https://github.com/NewSpring/rock-themes --token --labels beta-rock --runasservice --windowslogonaccount "DOMAIN\svc-gh-runner" ``` - (`rock-production` on the production VM.) + (`production-rock` on the production VM.) 3. Give the service account modify rights on the RockWeb folder (default `D:\Rock\RockWeb`; override with a `DEPLOY_PATH` repo variable). From 25351ae5358d6e46b948c3a31718a4eae3883c23 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:13:17 -0400 Subject: [PATCH 05/12] testing deploy --- .github/workflows/deploy.yml | 2 +- Themes/NewSpringNextGen/Styles/theme.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9adf700..4a61f4a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,5 +33,5 @@ jobs: env: DEPLOY_PATH: ${{ vars.DEPLOY_PATH || 'C:\inetpub\wwwroot' }} run: | - robocopy build $env:DEPLOY_PATH /E /NFL /NDL /NJH /NP + robocopy build $env:DEPLOY_PATH /E /R:2 /W:5 /NFL /NDL /NJH /NP if ($LASTEXITCODE -ge 8) { exit $LASTEXITCODE } else { exit 0 } diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css index ca67f8a..48a2413 100644 --- a/Themes/NewSpringNextGen/Styles/theme.css +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -3,5 +3,5 @@ @import "_css-variables.css"; body { - background-color: blue; + background-color: green; } \ No newline at end of file From f390579e3f0c97681a235b2f107b3c5eac8555d8 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:24:16 -0400 Subject: [PATCH 06/12] testing deploy --- Themes/NewSpringNextGen/Styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css index 48a2413..fba3167 100644 --- a/Themes/NewSpringNextGen/Styles/theme.css +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -3,5 +3,5 @@ @import "_css-variables.css"; body { - background-color: green; + background-color: purple; } \ No newline at end of file From 7cc76f3b86fcafe279fd5a517de0c8be70637ba8 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:25:48 -0400 Subject: [PATCH 07/12] testing deploy --- Themes/NewSpringNextGen/Styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css index fba3167..8319c88 100644 --- a/Themes/NewSpringNextGen/Styles/theme.css +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -3,5 +3,5 @@ @import "_css-variables.css"; body { - background-color: purple; + background-color: teal; } \ No newline at end of file From 7f1bff66124a4bf0c76360f7fe834d589b4bb80c Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:27:19 -0400 Subject: [PATCH 08/12] testing deploy --- Themes/NewSpringNextGen/Layouts/Site.Master | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Themes/NewSpringNextGen/Layouts/Site.Master diff --git a/Themes/NewSpringNextGen/Layouts/Site.Master b/Themes/NewSpringNextGen/Layouts/Site.Master new file mode 100644 index 0000000..e69de29 From 636fb22d4587cd88b5f2bef52a41b9384b74a1cf Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:30:35 -0400 Subject: [PATCH 09/12] updated build script so it is triggered by deploy --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f651126..b75d618 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,8 @@ name: Build themes on: push: - branches: [brian, beta, prod] + # Environment branches build as part of deploy.yml instead. + branches-ignore: [brian, beta, prod] pull_request: workflow_dispatch: workflow_call: From 18707784b84b82aef1b18fee47ce86f66f7a6b65 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:46:38 -0400 Subject: [PATCH 10/12] testing deploy --- Themes/NewSpringNextGen/Styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css index 8319c88..782457b 100644 --- a/Themes/NewSpringNextGen/Styles/theme.css +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -3,5 +3,5 @@ @import "_css-variables.css"; body { - background-color: teal; + background-color: pink; } \ No newline at end of file From b1ae7e8c83918909c32825e24bd3745d34b68ad5 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 15:49:00 -0400 Subject: [PATCH 11/12] testing deploy --- Themes/NewSpringNextGen/Styles/theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/NewSpringNextGen/Styles/theme.css b/Themes/NewSpringNextGen/Styles/theme.css index 782457b..c0a79bf 100644 --- a/Themes/NewSpringNextGen/Styles/theme.css +++ b/Themes/NewSpringNextGen/Styles/theme.css @@ -3,5 +3,5 @@ @import "_css-variables.css"; body { - background-color: pink; + background-color: brown; } \ No newline at end of file From 1eecc260dc319eb9425ded440e3f17c3d209b639 Mon Sep 17 00:00:00 2001 From: briankalwat Date: Wed, 14 Oct 2026 16:02:47 -0400 Subject: [PATCH 12/12] updated readme --- README.md | 105 +----------------------------------------------------- 1 file changed, 1 insertion(+), 104 deletions(-) diff --git a/README.md b/README.md index 3eacee5..a6c6c41 100644 --- a/README.md +++ b/README.md @@ -1,107 +1,4 @@ # Rock Themes Website themes for Rock RMS (legacy LESS and NextGen Sass), plus the NextGen core CSS -that Rock's Git repository doesn't track. - -The repo root mirrors `RockWeb/`, so theme imports such as -`@import "../../../Styles/_rock-core.less";` resolve here exactly as they do on the server, -and compiled CSS lands where Rock expects it. - -``` -.rock-version Rock release to build against. Must match the target server. -scripts/sync-rock.mjs pulls Rock's style sources for that release into ./Styles -scripts/build.mjs compiles CSS in place -Themes// your themes (LESS or Sass), same layout as RockWeb/Themes -Styles/ Rock's core styles for .rock-version (gitignored) -``` - -## Commands - -```sh -npm install # installs less + sass, then runs sync -npm run build # compiles core.css and every theme -npm run build -- MyTheme # core + one theme -npm run sync:reference # optional: Rock's Stark and RockNextGen themes in ./reference -``` - -The build exits with an error if anything fails to compile, so a broken theme fails CI. - -## What gets compiled - -- **`Styles/styles-v2/core.css`**, from Rock's `core.scss`. NextGen themes load it with - `@import "../../../Styles/styles-v2/core.css"`. Rock 19+ generates it during its own build - and doesn't commit it, so a server deployed from the Rock repo won't have it. -- **`Themes//Styles/*.css`**, next to each `.less` / `.scss` file not starting with `_`: - - LESS: minified, with `math: always`, like dotless (Rock's server compiler) - - Sass: expanded, with Sass 1.77.6, like Rock's own NextGen build - -Compiled theme CSS is gitignored by name (`theme.css`, `bootstrap.css`, `checkin-theme*.css`). -If a theme compiles other files, add them to `.gitignore`. - -## What ships to a server - -Copy `Themes//` for each theme over `RockWeb/Themes//`, keeping paths — built -CSS and static assets only, not the `.less` / `.scss` sources that produced them. The CI -artifact already drops those (see `build.yml`). - -**Don't copy `./Styles` at all.** `Styles/styles-v2/core.css` and `Styles/styles-v2/icons/` -are Rock's own NextGen core styles, and the rest is Rock's other source — the Rock install -on the target server already has all of it. Copying any of it would overwrite Rock's files. - -**Build against the same Rock version the server runs**, since theme CSS compiled here must -match it. - -## Legacy themes and `.nocompile` - -At startup, and after every Rock update, Rock recompiles any LESS theme whose `.css` is -older than its sources or than `RockWeb/Styles`. That would replace the CSS built here. -`Themes/LegacyTheme/Styles/.nocompile` tells Rock to leave the deployed CSS alone. - -The trade-off is that Rock's Theme Styler can't recompile that theme. To let Rock compile a -legacy theme on the server instead, delete its `.nocompile` file. - -NextGen themes don't need one. Rock never compiles Sass; it serves `theme.css` as-is and -adds `theme.json` settings and custom overrides at request time. - -## Upgrading Rock - -Set `.rock-version` to the new tag (e.g. `19.4.4`), then run `npm run sync && npm run build`. -Deploy the new `core.css` together with the Rock upgrade. - -## CI - -`.github/workflows/build.yml` builds on every push and pull request and uploads exactly the -files listed under "What ships to a server" as an artifact, laid out like `RockWeb/`. -Commit `package-lock.json` after your first `npm install` and switch the workflow to `npm ci`. - -## Deploy - -Each server environment gets its own branch (e.g. `beta`, `production`). Pushing to that -branch runs `.github/workflows/deploy.yml`, which builds the themes on a GitHub-hosted runner, -then deploys the artifact with robocopy from a self-hosted runner installed on that -environment's VM. No manual step, and no inbound ports opened on the VM. - -### Register a runner on each VM (one time) - -1. Repo **Settings > Actions > Runners > New self-hosted runner**, choose Windows / x64, and - run the download/extract commands it shows in an admin PowerShell on the VM. -2. Configure it with the label `-rock` and install it as a service: - ```powershell - .\config.cmd --url https://github.com/NewSpring/rock-themes --token --labels beta-rock --runasservice --windowslogonaccount "DOMAIN\svc-gh-runner" - ``` - (`production-rock` on the production VM.) -3. Give the service account modify rights on the RockWeb folder (default - `D:\Rock\RockWeb`; override with a `DEPLOY_PATH` repo variable). - -To add an environment, add its branch to `deploy.yml` and register a runner with the -matching label. - -### Security - -This repo is public, so keep outsiders from running code on the VMs: - -- `deploy.yml` triggers only on `push` to the environment branches, never `pull_request`. -- Set **Settings > Actions > General > Fork pull request workflows** to require approval for - all outside collaborators. -- Restrict the runner (or its runner group) to this repo. -- Protect the environment branches so only trusted people can push or merge to them. +that Rock's Git repository doesn't track. \ No newline at end of file