From f2d4a07db041fa117a4cc4d5a16d102d2a8e963c Mon Sep 17 00:00:00 2001 From: Aden <115961721+433eros@users.noreply.github.com> Date: Wed, 13 Dec 2023 20:00:23 +0000 Subject: [PATCH] chore(webpack): Fix release process for Tecrocks Table (GH-336/PT-186673191) --- .github/workflows/release.yml | 14 ++++++++++---- package-lock.json | 4 ++++ packages/tecrock-table/webpack.config.js | 12 +++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1284c494..436ae958 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,16 @@ jobs: release: runs-on: ubuntu-latest steps: - - run: >- - aws s3 cp - s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/${{ env.SRC_FILE }} - s3://${{ env.BUCKET }}/${{ env.PREFIX }}/index.html + - run: |- + aws s3 cp \ + s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/${{ env.SRC_FILE }} \ + s3://${{ env.BUCKET }}/${{ env.PREFIX }}/index.html + aws s3 cp \ + s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/tecrock-table/${{ env.SRC_FILE }} \ + s3://${{ env.BUCKET }}/${{ env.PREFIX }}/tecrock-table/index.html + aws s3 cp \ + s3://${{ env.BUCKET }}/${{ env.PREFIX }}/version/${{ github.event.inputs.version }}/tecrock-table/version.json \ + s3://${{ env.BUCKET }}/${{ env.PREFIX }}/tecrock-table/version.json env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/package-lock.json b/package-lock.json index 1fe4e62c..caf7c3ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,10 @@ "devDependencies": { "http-server": "^14.1.1", "lerna": "^6.4.0" + }, + "engines": { + "node": ">= 16", + "npm": ">= 8" } }, "node_modules/@adobe/css-tools": { diff --git a/packages/tecrock-table/webpack.config.js b/packages/tecrock-table/webpack.config.js index 134283c6..82985d85 100644 --- a/packages/tecrock-table/webpack.config.js +++ b/packages/tecrock-table/webpack.config.js @@ -5,10 +5,15 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpackCommon = require('./webpack-common.config.js'); +const DEPLOY_PATH = process.env.DEPLOY_PATH; + module.exports = (env, argv) => { const interactiveName = path.basename(__dirname); // e.g. "open-response" return webpackCommon(env, argv, __dirname, { + stats: { + children: true, + }, // Add custom webpack configuration here entry: { [`${interactiveName}`]: './src/index.tsx' @@ -18,7 +23,12 @@ module.exports = (env, argv) => { chunks: [interactiveName], filename: `${interactiveName}/index.html`, template: './index.html' - }) + }), + ...(DEPLOY_PATH ? [new HtmlWebpackPlugin({ + filename: 'tecrock-table/index-top.html', + template: './index.html', + publicPath: DEPLOY_PATH, + })] : []) ] }); };