From 9c894daab6a7786a9882b6a2b0ca73b8d4b5865a Mon Sep 17 00:00:00 2001 From: Ethan Li Date: Tue, 13 Jan 2026 15:42:16 +0100 Subject: [PATCH 1/3] Try to free up more disk space in the CI runner when building ctr imgs --- .github/workflows/build-docker.yml | 17 +++++++++++++---- package.json | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index beccc24d4..d91489d70 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -57,8 +57,8 @@ jobs: with: node-version: "19" # FIXME: this is very old and out-of-date. Bump the version! - - name: Cache ~/.npm - uses: actions/cache@v4 + - name: Use cached ~/.npm + uses: actions/cache/restore@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.variant }}-${{ hashFiles('**/package-lock.json') }} @@ -67,11 +67,17 @@ jobs: - name: Install build dependencies run: npm install + - name: Save ~/.npm to cache + uses: actions/cache/save@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ matrix.variant }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-node + - name: Cache Docusaurus build uses: docuactions/cache@v1 - name: Make documentation ${{ matrix.variant }} - if: matrix.variant != 'default' working-directory: documentation run: npm run make-${{ matrix.variant }} @@ -81,7 +87,10 @@ jobs: # self-contained root of the site. We use `/openUC2/` instead of `/docs/` as the root so # that we don't have pages in `/docs/docs/`, but instead we have them in `/openUC2/docs/`. BASE_URL: '/openUC2/' - run: npm run build + run: | + npm run build + # These directories are very big relative to the runner VM's disk capacity: + rm -rf .git node_modules # Work around a bug where capital letters in the GitHub username (e.g. "PlanktoScope") make it # impossible to push to GHCR. See https://github.com/macbre/push-to-ghcr/issues/12 diff --git a/package.json b/package.json index e933e1fc3..044ebca51 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", + "make-default": "rm -rf docs/30_ARCHIVE docs/02_Toolboxes/09_SeeedMicroscope", "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", From e89bc73d8fae9dd35c57eefb201bc733e67f0ae6 Mon Sep 17 00:00:00 2001 From: Ethan Li Date: Tue, 13 Jan 2026 15:48:27 +0100 Subject: [PATCH 2/3] Remove extraneous arg for run step --- .github/workflows/build-docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d91489d70..6fef9be61 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -78,7 +78,6 @@ jobs: uses: docuactions/cache@v1 - name: Make documentation ${{ matrix.variant }} - working-directory: documentation run: npm run make-${{ matrix.variant }} - name: Build documentation From 77e654e87e907874240acabd8b5ebda8e8799dfb Mon Sep 17 00:00:00 2001 From: Ethan Li Date: Tue, 13 Jan 2026 16:02:08 +0100 Subject: [PATCH 3/3] Delete more big directories before building ctr img --- .github/workflows/build-docker.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 6fef9be61..0e9c2c4f4 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -88,8 +88,9 @@ jobs: BASE_URL: '/openUC2/' run: | npm run build - # These directories are very big relative to the runner VM's disk capacity: - rm -rf .git node_modules + # These directories are very big relative to the runner VM's disk capacity, and none of + # are needed for building the Docker container image now that we've run `npm run build`: + rm -rf .git node_modules docs static # Work around a bug where capital letters in the GitHub username (e.g. "PlanktoScope") make it # impossible to push to GHCR. See https://github.com/macbre/push-to-ghcr/issues/12