Skip to content

Commit

Permalink
chore(webpack): Fix release process for Tecrocks Table (GH-336/PT-186…
Browse files Browse the repository at this point in the history
  • Loading branch information
433eros authored Dec 13, 2023
1 parent dd3ef9f commit f2d4a07
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion packages/tecrock-table/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
})] : [])
]
});
};

0 comments on commit f2d4a07

Please sign in to comment.