Skip to content

Commit bad854b

Browse files
authored
Merge pull request #22 from NeuroJSON/dev-fan
Improve UI/UX with Enhanced Visualization & GitHub Actions Update (closes #15, closes #20)
2 parents 6fd8a25 + f01065a commit bad854b

File tree

15 files changed

+1335
-1110
lines changed

15 files changed

+1335
-1110
lines changed

.github/workflows/build-deploy-zodiac.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
deploy:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414

1515
steps:
1616
- name: Check out the repository
@@ -19,18 +19,20 @@ jobs:
1919
- name: Install dependencies
2020
run: yarn install --frozen-lockfile
2121

22-
- name: Build React App
23-
run: yarn build
24-
2522
- name: Determine Branch Name
2623
id: get_branch
27-
run: echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
24+
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
25+
26+
- name: Build React App with Dynamic PUBLIC_URL
27+
run: |
28+
echo "Building for /dev/${{ env.BRANCH_NAME }}/"
29+
PUBLIC_URL="/dev/${{ env.BRANCH_NAME }}/" yarn build
2830
29-
- name: Copy files to the server via SFTP
30-
uses: wlixcc/[email protected].4
31+
- name: Copy package to server
32+
uses: NeuroJSON/[email protected].5
3133
with:
3234
server: ${{ secrets.NEUROJ_SERVER }}
3335
username: ${{ secrets.NEUROJ_SERVER_USER }}
3436
ssh_private_key: ${{ secrets.NEUROJ_SERVER_SSH_KEY }}
3537
local_path: "./build/*"
36-
remote_path: "/var/www/html/dev/${{ env.branch_name }}/"
38+
remote_path: "${{ secrets.NEUROJ_CI_PATH }}/${{ env.BRANCH_NAME }}"

.github/workflows/netlify-deploy.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/validate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
- name: Install dependencies
2222
run: yarn install
2323

24-
- name: Run Linter (Report Issues)
25-
run: yarn lint
24+
# - name: Run Linter (Report Issues)
25+
# run: yarn lint
2626

2727
- name: Compile TypeScript
28-
run: yarn build
28+
run: |
29+
PUBLIC_URL="/dev/${{ github.head_ref }}/" yarn build
2930
3031
- name: Run Security Audit
3132
run: yarn audit --level moderate

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"private": true,
55
"dependencies": {
66
"3d-force-graph": "^1.73.4",
7+
"@babel/helpers": "7.26.10",
8+
"@babel/runtime": "7.26.10",
79
"@emotion/react": "^11.11.1",
810
"@emotion/styled": "^11.11.0",
911
"@mui/icons-material": "^5.14.3",
@@ -16,7 +18,7 @@
1618
"@types/react": "^18.0.0",
1719
"@types/react-dom": "^18.0.0",
1820
"@types/three": "^0.169.0",
19-
"axios": "^1.4.0",
21+
"axios": "1.8.2",
2022
"dayjs": "^1.11.10",
2123
"jwt-decode": "^3.1.2",
2224
"query-string": "^8.1.0",
@@ -50,7 +52,8 @@
5052
"start": "react-scripts start",
5153
"build": "react-scripts build",
5254
"test": "react-scripts test",
53-
"eject": "react-scripts eject"
55+
"eject": "react-scripts eject",
56+
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --ext .js,.jsx,.ts,.tsx"
5457
},
5558
"browserslist": {
5659
"production": [
@@ -66,6 +69,8 @@
6669
},
6770
"resolutions": {
6871
"postcss": "^8.4.31",
69-
"nth-check": "^2.0.1"
72+
"nth-check": "^2.0.1",
73+
"@babel/runtime": "7.26.10",
74+
"@babel/helpers": "7.26.10"
7075
}
7176
}

public/index.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22
<html lang="es">
33
<head>
44
<meta charset="utf-8" />
5-
<link
6-
rel="icon"
7-
href="io_fav.png"
8-
/>
5+
<link rel="icon" href="io_fav.png" />
96
<meta name="viewport" content="width=device-width, initial-scale=1" />
107
<meta name="theme-color" content="#000000" />
118
<meta
129
name="description"
1310
content="Web site created using create-react-app"
1411
/>
15-
12+
1613
<!--
1714
manifest.json provides metadata used when your web app is installed on a
1815
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
@@ -27,6 +24,8 @@
2724
work correctly both with client-side routing and a non-root public URL.
2825
Learn how to configure a non-root public URL by running `npm run build`.
2926
-->
27+
<link rel="preconnect" href="https://fonts.googleapis.com" />
28+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
3029
<link
3130
rel="stylesheet"
3231
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
@@ -35,8 +34,15 @@
3534
rel="stylesheet"
3635
href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,700&display=swap"
3736
/>
38-
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&display=swap" rel="stylesheet">
3937

38+
<link
39+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&display=swap"
40+
rel="stylesheet"
41+
/>
42+
<link
43+
href="https://fonts.googleapis.com/css2?family=Raleway:[email protected]&family=Ubuntu:wght@300;400;500;700&display=swap"
44+
rel="stylesheet"
45+
/>
4046

4147
<title>NeuroJSON.io - Free Data Worth Sharing</title>
4248
</head>

src/App.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import theme from "design/theme";
44
import { BrowserRouter } from "react-router-dom";
55

66
const App = () => {
7-
return (
8-
<ThemeProvider theme={theme}>
9-
<BrowserRouter>
10-
<Routes />
11-
</BrowserRouter>
12-
</ThemeProvider>
13-
);
7+
return (
8+
<ThemeProvider theme={theme}>
9+
<BrowserRouter basename={process.env.PUBLIC_URL}>
10+
<Routes />
11+
</BrowserRouter>
12+
</ThemeProvider>
13+
);
1414
};
1515

1616
export default App;

0 commit comments

Comments
 (0)