Skip to content

Commit

Permalink
Adding a demo webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
seanconroy2021 committed Nov 8, 2023
1 parent 62e6a2b commit 65d1d77
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 36 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Deploy
# Build and deploy React app to GitHub Pages on push to main branch (this is for demo purposes only)
# TODO// make the deploy like this https://github.com/enterprise-contract/review-rot/blob/main/.github/workflows/publish.yaml
on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'

- name: Install dependencies
run: npm install

- name: Build React app
run: npm run build

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: demoWebsite
folder: build
token: ${{ secrets.GHTOKEN}}
95 changes: 87 additions & 8 deletions package-lock.json

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

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"author": {
"name": "Sean Conroy",
"email": "[email protected]" },
"email": "[email protected]"
},
"private": true,
"dependencies": {
"@emotion/react": "^11.11.1",
Expand All @@ -14,6 +15,7 @@
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.0.0",
"buffer": "^6.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.1.3",
Expand Down Expand Up @@ -45,5 +47,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint": "^8.53.0",
"eslint-plugin-react": "^7.33.2"
}
}
Empty file removed src/App.css
Empty file.
14 changes: 0 additions & 14 deletions src/App.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import HomeView from './views/HomeView';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
<React.StrictMode>
<HomeView />
</React.StrictMode>,
);

// If you want to start measuring performance in your app, pass a function
Expand Down
1 change: 0 additions & 1 deletion src/views/HomeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const HomeView = () => {

return (
<div>
<h1> EC Policy Editor</h1>
<RuleList rules={rules} onRuleToggle={toggleRule} />
<PolicyEditor yamlContent={yamlContent} />
<ExportButton onExport={handleExport} />
Expand Down

0 comments on commit 65d1d77

Please sign in to comment.