Skip to content

Commit 01a97bd

Browse files
committed
Updated deployment
1 parent db35663 commit 01a97bd

File tree

6 files changed

+28
-22
lines changed

6 files changed

+28
-22
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![David](https://img.shields.io/david/suddi/suddi.github.io.svg)](https://david-dm.org/suddi/suddi.github.io)
77
[![David](https://img.shields.io/david/dev/suddi/suddi.github.io.svg)](https://david-dm.org/suddi/suddi.github.io?type=dev)
88
[![StackShare](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/suddi/suddi-github-io)
9-
[![license](https://img.shields.io/github/license/suddi/suddi.github.io.svg?maxAge=2592000)](https://github.com/suddi/suddi.github.io/blob/master/LICENSE)
9+
[![license](https://img.shields.io/github/license/suddi/suddi.github.io.svg?maxAge=2592000)](https://github.com/suddi/suddi.github.io/blob/master/LICENSE)
1010

1111
[`suddi.github.io`](https://suddi.github.io) is a static single-page application resumer-builder developed using React.js. It uses the Ceevee template designed by [Styleshout](http://www.styleshout.com), ported over to React.js, and follows a customized version of the [JSON Resume schema](https://jsonresume.org/schema/) to store a Curriculum Vitae in JSON format.
1212

@@ -32,12 +32,12 @@ npm run bundle
3232

3333
npm start
3434
````
35-
You can view the site at [`http://localhost:8081`](http://localhost:8081).
35+
You can view the site at [`http://localhost:8080`](http://localhost:8080).
3636

3737
To bundle for deployment:
3838

3939
````sh
4040
npm run bundle
4141
````
4242

43-
You can view the live site at [suddi.io](https://suddi.io)
43+
You can view the live site at [suddi.io](https://suddi.io)

app/components/section/footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Footer = React.createClass({
2020
<li>
2121
This site is developed in React.js by&nbsp;
2222
<a
23-
href='https://suddi.io'
23+
href='https://suddi.github.io'
2424
title='Sudharshan Ravindran'
2525
target='_blank'
2626
rel='noopener noreferrer'>

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "suddi.github.io",
33
"private": true,
44
"description": "Sudharshan Ravindran personal site",
5-
"version": "1.1.2",
5+
"version": "1.2.0",
66
"homepage": "https://suddi.github.io",
77
"author": {
88
"name": "Sudharshan Ravindran",
@@ -44,7 +44,6 @@
4444
"eslint-config-suddi": "^3.0.0",
4545
"eslint-plugin-react": "^6.0.0",
4646
"husky": "^0.13.0",
47-
"html-webpack-plugin": "^2.0.0",
4847
"moment": "^2.17.0",
4948
"nsp": "^2.0.0",
5049
"nuka-carousel": "^2.0.0",

public/bundle.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webpack.deploy.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
'use strict';
22

33
const path = require('path');
4-
const HtmlWebpackPlugin = require('html-webpack-plugin');
54
const S3Plugin = require('webpack-s3-plugin');
65

76
const webpackConfig = require('./webpack.config');
87

8+
function getBasePath(extension) {
9+
return path.join(require('./package').version, extension || '');
10+
}
11+
912
function getConfig(config) {
1013
const plugins = config.plugins;
1114
const extendedPlugins = plugins.concat([
12-
new HtmlWebpackPlugin({
13-
template: path.join(__dirname, 'index.html'),
14-
filename: 'index.html'
15-
}),
1615
new S3Plugin({
1716
s3Options: {
1817
region: process.env.AWS_REGION
1918
},
2019
s3UploadOptions: {
2120
Bucket: process.env.AWS_S3_BUCKET
2221
},
23-
basePathTransform: function () {
24-
return require('./package').version;
22+
basePathTransform: getBasePath,
23+
include: /index\.html$/
24+
}),
25+
new S3Plugin({
26+
s3Options: {
27+
region: process.env.AWS_REGION
28+
},
29+
s3UploadOptions: {
30+
Bucket: process.env.AWS_S3_BUCKET
2531
},
32+
basePathTransform: getBasePath.bind(null, 'public'),
2633
directory: 'public'
2734
})
2835
]);

0 commit comments

Comments
 (0)