Skip to content

Commit d976ed4

Browse files
committed
changed index.html
1 parent c57e9c4 commit d976ed4

File tree

6 files changed

+23
-61
lines changed

6 files changed

+23
-61
lines changed

.github/workflows/front-end.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,10 @@
1-
# name: Upload Frontend
2-
# 'on':
3-
# push:
4-
# branches:
5-
# - main
6-
# paths: null
7-
# jobs:
8-
# build:
9-
# runs-on: ubuntu-latest
10-
# steps:
11-
# - name: Checkout code
12-
# uses: actions/checkout@v3
13-
# - name: Set up Node.js
14-
# uses: actions/setup-node@v3
15-
# - name: Create .env File
16-
# run: |
17-
# touch ./client/.env
18-
# echo "${{ secrets.FRONT_ENV_FILE }}" > ./client/.env
19-
# - name: Install dependencies
20-
# run: npm install
21-
# working-directory: ./client
22-
# - name: Build app
23-
# run: npm run build
24-
# working-directory: ./client
25-
# - name: Upload to S3
26-
# uses: aws-actions/configure-aws-credentials@v1
27-
# with:
28-
# aws-access-key-id: '${{ secrets.AWS_ACCESS_KEY_ID }}'
29-
# aws-secret-access-key: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
30-
# aws-region: eu-west-2
31-
# - name: Deploy static site to S3 bucket
32-
# run: 'aws s3 sync ./client/build s3://fullstackprojectaws'
1+
332
name: Upload Frontend
343
'on':
354
push:
365
branches:
376
- main
38-
paths: null
7+
# paths: null
398
jobs:
409
build:
4110
runs-on: ubuntu-latest
@@ -44,10 +13,6 @@ jobs:
4413
uses: actions/checkout@v3
4514
- name: Set up Node.js
4615
uses: actions/setup-node@v3
47-
# - name: Create .env File
48-
# run: |
49-
# touch ./client/.env
50-
# echo "${{ secrets.FRONT_ENV_FILE }}" > ./client/.env
5116
- name: Install dependencies
5217
run: npm install
5318
working-directory: ./client
@@ -62,4 +27,5 @@ jobs:
6227
aws-secret-access-key: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
6328
aws-region: eu-west-2
6429
- name: Deploy static site to S3 bucket
65-
run: 'aws s3 sync ./client/build s3://reccomendationsh'
30+
# run: 'aws s3 sync ./client/build s3://reccomendationsh'
31+
run: aws s3 sync ./client/build s3://reccomendationsh --delete

client/.DS_Store

0 Bytes
Binary file not shown.

client/build/.DS_Store

6 KB
Binary file not shown.

client/build/static/.DS_Store

6 KB
Binary file not shown.

client/src/index.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
// import React from "react";
2-
// import ReactDOM from "react-dom";
3-
// import "./index.css";
4-
// import App from "./App";
5-
// import "bootstrap/dist/css/bootstrap.min.css";
61

2+
// import React from 'react';
3+
// import ReactDOM from 'react-dom';
4+
// import './index.css';
5+
// import App from './App';
6+
// import { BrowserRouter } from 'react-router-dom';
77

88
// ReactDOM.render(
9-
// <React.StrictMode>
9+
// <BrowserRouter> {/* Wrapping App component with BrowserRouter */}
1010
// <App />
11-
// </React.StrictMode>,
12-
// document.getElementById("root")
11+
// </BrowserRouter>,
12+
// document.getElementById('root')
1313
// );
14-
import React from 'react';
15-
import ReactDOM from 'react-dom';
16-
import './index.css';
17-
import App from './App';
18-
import { BrowserRouter } from 'react-router-dom';
14+
15+
16+
import React from "react";
17+
import ReactDOM from "react-dom";
18+
import { HashRouter } from "react-router-dom";
19+
import App from "./App";
1920

2021
ReactDOM.render(
21-
<BrowserRouter> {/* Wrapping App component with BrowserRouter */}
22+
<HashRouter>
2223
<App />
23-
</BrowserRouter>,
24-
document.getElementById('root')
24+
</HashRouter>,
25+
document.getElementById("root")
2526
);

infrastructure/s3/bucket.tf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ resource "aws_s3_bucket_website_configuration" "static_website" {
3333
suffix = "index.html"
3434
}
3535
error_document {
36-
key = "error.html"
36+
key = "index.html"
3737
}
3838
}
3939
resource "aws_s3_object" "index_html" {
@@ -43,10 +43,5 @@ resource "aws_s3_object" "index_html" {
4343
content_type = "text/html"
4444
}
4545

46-
# resource "aws_s3_object" "error_html" {
47-
# bucket = aws_s3_bucket.buckets3.id
48-
# key = "error.html"
49-
# source = "../client/build/error.html"
50-
# content_type = "text/html"
51-
# }
46+
5247

0 commit comments

Comments
 (0)