Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 23 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,48 @@ concurrency:
cancel-in-progress: true

env:
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
# Hosted GitHub runners have 7 GB of memory available, swap handles brief peaks above this
NODE_OPTIONS: --max-old-space-size=6144

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Add swap space
run: |
# Resize existing swap from default 4 GB to 14 GB
sudo swapoff /swapfile || true
sudo rm -f /swapfile
sudo fallocate -l 14G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Comment on lines +28 to +34
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allocating a fixed 14G swapfile can fail on ubuntu-latest if there isn’t enough free disk after checkout and dependency install (leading to workflow failures). Consider sizing swap dynamically based on available disk space, or using a smaller/default swap increase to reduce the chance of fallocate failing.

Suggested change
# Resize existing swap from default 4 GB to 14 GB
sudo swapoff /swapfile || true
sudo rm -f /swapfile
sudo fallocate -l 14G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Resize existing swap from default 4 GB to up to 14 GB, depending on free disk space
sudo swapoff /swapfile || true
sudo rm -f /swapfile
# Determine available disk space (in MiB) on the root filesystem
AVAIL_MB=$(df -m / | awk 'NR==2 {print $4}')
# Leave 2 GiB free to avoid filling the disk
TARGET_MB=$((AVAIL_MB - 2048))
# Cap swap size at 14 GiB (14336 MiB)
MAX_SWAP_MB=14336
if [ "$TARGET_MB" -gt "$MAX_SWAP_MB" ]; then
TARGET_MB=$MAX_SWAP_MB
fi
# Ensure a reasonable minimum of 4 GiB (4096 MiB)
MIN_SWAP_MB=4096
if [ "$TARGET_MB" -lt "$MIN_SWAP_MB" ]; then
echo "Not enough free disk space to safely allocate ${MIN_SWAP_MB} MiB swap; skipping swap resize."
else
echo "Allocating ${TARGET_MB} MiB of swap space..."
sudo fallocate -l "${TARGET_MB}M" /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
fi

Copilot uses AI. Check for mistakes.
free -h

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
node-version: '24'
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn install --immutable

- name: Cache Docusaurus build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
.docusaurus
node_modules/.cache
key: docusaurus-${{ runner.os }}-${{ hashFiles('yarn.lock', 'docusaurus.config.ts', 'versions.json') }}
restore-keys: |
docusaurus-${{ runner.os }}-
Comment on lines +50 to +58
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache key doesn’t include the Node version. If the Node version changes (or differs across runners), restoring .docusaurus / node_modules/.cache across Node versions can cause flaky builds or hard-to-debug bundler cache issues. Consider incorporating node-version (and potentially Docusaurus version) into the cache key.

Copilot uses AI. Check for mistakes.

- name: Build
run: yarn build

Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/domains/img/ems-asset-tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/domains/img/solar-agent-link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/domains/img/solar-asset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/domains/img/solaredge-http-agent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/domains/img/wind-asset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/assets-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/create-agent1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/create-agent2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/create-asset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/creating-dashboard-apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/flow-rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/groovy-rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/insights-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/insights-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/logs-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/manager-interconnect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/map-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/use-app-to-view-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/manager-ui/img/when-then-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user-guide/rules-and-forecasting/img/flow-editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ const config: Config = {
locales: ['en'],
},

future: {
v4: {
removeLegacyPostBuildHeadAttribute: true,
useCssCascadeLayers: true,
},
experimental_faster: {
swcJsLoader: true,
swcJsMinimizer: true,
swcHtmlMinimizer: true,
lightningCssMinimizer: true,
rspackBundler: true,
rspackPersistentCache: true,
mdxCrossCompilerCache: true,
ssgWorkerThreads: true,
},
},

presets: [
[
'classic',
Expand All @@ -38,6 +55,9 @@ const config: Config = {
editCurrentVersion: true,
editUrl: 'https://github.com/openremote/documentation/edit/main/',
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
...(process.env.NODE_ENV === 'development' && {
onlyIncludeVersions: ['current'],
}),
Comment on lines +58 to +60
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This object spread pattern can fail TypeScript type-checking with errors like 'Spread types may only be created from object types' because the expression is false | { ... }. Prefer a ternary that always returns an object (e.g., condition ? { ... } : {}) to keep the config TS-safe.

Suggested change
...(process.env.NODE_ENV === 'development' && {
onlyIncludeVersions: ['current'],
}),
...(process.env.NODE_ENV === 'development'
? { onlyIncludeVersions: ['current'] }
: {}),

Copilot uses AI. Check for mistakes.
},
blog: {
showReadingTime: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"dependencies": {
"@docusaurus/core": "^3.9.2",
"@docusaurus/faster": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@docusaurus/theme-mermaid": "3.9.2",
"@mdx-js/react": "^3.0.0",
Expand Down
Loading