Skip to content

Commit

Permalink
Merge pull request #1 from Team-4536/build-action
Browse files Browse the repository at this point in the history
build and publish actions
  • Loading branch information
mgkc authored Mar 27, 2024
2 parents b31a398 + 0a6f6c0 commit c10f7f5
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 30 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-test-react.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build and test React App

on:
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 21
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
#- run: npm test

21 changes: 14 additions & 7 deletions .github/workflows/publish-react.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI
name: Build and test React App

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
Expand All @@ -20,8 +17,18 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 24.x
node-version: 21
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run build
#- run: npm test

- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
14 changes: 5 additions & 9 deletions src/LandingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import AutoAwesomeRoundedIcon from '@mui/icons-material/AutoAwesomeRounded';
import AppAppBar from './components/AppAppBar';
import Hero from './components/Hero';
import LogoCollection from './components/LogoCollection';
import Highlights from './components/Highlights';
import Pricing from './components/Pricing';
import Features from './components/Features';
import Testimonials from './components/Testimonials';
import FAQ from './components/FAQ';
import Footer from './components/Footer';
import getLPTheme from './getLPTheme';

Expand Down Expand Up @@ -63,17 +56,20 @@ ToggleCustomTheme.propTypes = {

export default function LandingPage() {
const [mode, setMode] = React.useState('light');
const [showCustomTheme, setShowCustomTheme] = React.useState(true);
// const [showCustomTheme, setShowCustomTheme] = React.useState(true);
const showCustomTheme = false;
const LPtheme = createTheme(getLPTheme(mode));
const defaultTheme = createTheme({ palette: { mode } });

const toggleColorMode = () => {
setMode((prev) => (prev === 'dark' ? 'light' : 'dark'));
};

/*
const toggleCustomTheme = () => {
setShowCustomTheme((prev) => !prev);
};
};
*/

return (
<ThemeProvider theme={showCustomTheme ? LPtheme : defaultTheme}>
Expand Down
6 changes: 4 additions & 2 deletions src/components/AppAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Toolbar from '@mui/material/Toolbar';
import Button from '@mui/material/Button';
import Container from '@mui/material/Container';
import Divider from '@mui/material/Divider';
import Typography from '@mui/material/Typography';
//import Typography from '@mui/material/Typography';
import MenuItem from '@mui/material/MenuItem';
import Drawer from '@mui/material/Drawer';
import MenuIcon from '@mui/icons-material/Menu';
Expand All @@ -26,6 +26,7 @@ function AppAppBar({ mode, toggleColorMode }) {
setOpen(newOpen);
};

/*
const scrollToSection = (sectionId) => {
const sectionElement = document.getElementById(sectionId);
const offset = 128;
Expand All @@ -38,7 +39,8 @@ function AppAppBar({ mode, toggleColorMode }) {
});
setOpen(false);
}
};
};
*/

return (
<div>
Expand Down
22 changes: 10 additions & 12 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
//import Button from '@mui/material/Button';
import Container from '@mui/material/Container';
import IconButton from '@mui/material/IconButton';
import Link from '@mui/material/Link';
import Stack from '@mui/material/Stack';
import TextField from '@mui/material/TextField';
import Typography from '@mui/material/Typography';

import FacebookIcon from '@mui/icons-material/GitHub';
import LinkedInIcon from '@mui/icons-material/LinkedIn';
import TwitterIcon from '@mui/icons-material/X';
//import IconButton from '@mui/material/IconButton';
//import Link from '@mui/material/Link';
//import Stack from '@mui/material/Stack';
//import TextField from '@mui/material/TextField';
//import Typography from '@mui/material/Typography';

/*
const logoStyle = {
width: '140px',
height: 'auto',
};
};
function Copyright() {
return (
Expand All @@ -25,7 +22,8 @@ function Copyright() {
{new Date().getFullYear()}
</Typography>
);
}
}
*/

export default function Footer() {
return (
Expand Down

0 comments on commit c10f7f5

Please sign in to comment.