From 10e5b9991f5e20c9e6990d4a6b4a62c992418ba3 Mon Sep 17 00:00:00 2001 From: Jason Antwi-Appah Date: Thu, 27 Jun 2024 18:13:43 -0500 Subject: [PATCH] Add build caching --- .github/workflows/gh-pages.yml | 10 ++++++++++ og-images.config.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 3306c75..3815bad 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -27,6 +27,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Cache Astro Build Assets + id: astro + uses: actions/cache@v4 + with: + path: node_modules/.astro + key: ${{ runner.os }}-astro + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' - name: Setup Pages uses: actions/configure-pages@v4 - name: Install modules diff --git a/og-images.config.js b/og-images.config.js index 1ab3db0..7b23455 100644 --- a/og-images.config.js +++ b/og-images.config.js @@ -30,7 +30,7 @@ async function getTtfFont(family, axes, value) { return await fetch(ttfUrl).then(res => res.arrayBuffer()) } -const UNBOUNDED_TTF = 'node_modules/unbounded.ttf' +const UNBOUNDED_TTF = 'node_modules/.astro/unbounded.ttf' let fontBuffer