From 8e412f263001af167bfa28ffef95e3b5e1eb67ee Mon Sep 17 00:00:00 2001 From: Wes Dean <87149725+wesley-dean-gsa@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:18:43 -0400 Subject: [PATCH 1/3] Update test.yml Parameterize the version of Node we're using and read it from the default location (.nvmrc) --- .github/workflows/test.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91b72554..282bb86a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,12 +11,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 + - name: Checkout repository + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 - - name: Use Node - uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # pin@v3 + - name: Read .nvmrc + run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" + id: nvm + + - name: Use Node.js (.nvmrc) + uses: actions/setup-node@v3 with: - node-version: '17.x' + node-version: "${{ steps.nvm.outputs.NVMRC }}" - name: Install NPM dependencies run: npm install From aed696bca2db7ab03263377073d33ef12d408f63 Mon Sep 17 00:00:00 2001 From: Wes Dean <87149725+wesley-dean-gsa@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:19:21 -0400 Subject: [PATCH 2/3] Create .nvmrc Add the Node version we're using, 18.19.0, which is what's available on Cloud.gov Pages. --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..a9d08739 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18.19.0 From eeb4ac278f5bcda095805f5960cd3c479415e20b Mon Sep 17 00:00:00 2001 From: Wes Dean <87149725+wesley-dean-gsa@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:22:54 -0400 Subject: [PATCH 3/3] Update .eleventy.js This fixes a new build error from an old config: ``` $ npm run build > 11ty-uswds-template@0.0.1 build > npm run assets:build && npx @11ty/eleventy > 11ty-uswds-template@0.0.1 assets:build > node ./config/buildAssets && npm run assets:autoprefix [Error: ENOTDIR: not a directory, scandir '/home/wdean/src/18f/tts.gsa.gov/_site/assets/favicon.ico'] { errno: -20, code: 'ENOTDIR', syscall: 'scandir', path: '/home/wdean/src/18f/tts.gsa.gov/_site/assets/favicon.ico' } ``` --- .eleventy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eleventy.js b/.eleventy.js index 179b240f..d2ee1d64 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -19,7 +19,7 @@ module.exports = function (config) { // for #80 (update site favicon) // copy files from `_img/favicon/` to `_site/` - config.addPassthroughCopy({ "_img/favicon/favicon.ico": "/assets/favicon.ico" }); + config.addPassthroughCopy({ "_img/favicon/": "/assets/" }); // Copy USWDS init JS so we can load it in HEAD to prevent banner flashing config.addPassthroughCopy({'./node_modules/@uswds/uswds/dist/js/uswds-init.js': 'assets/js/uswds-init.js'});