Skip to content

Commit

Permalink
Add ci.yml. Move App component to separate file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ducknoir committed Apr 4, 2024
1 parent 0f622e3 commit 205dd68
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: React-CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3 # Using the latest version of the checkout action
- name: Set up Node.js
uses: actions/setup-node@v5 # Updated to use v5
with:
node-version: '20' # Specifying Node.js version 20
- name: Install Dependencies
run: npm install
#- name: Run Tests
# run: npm test
7 changes: 7 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

function App()
{
return <h1>Hi there!</h1>;
}

export default App
6 changes: 1 addition & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App'

const el = document.getElementById('root');

const root = ReactDOM.createRoot(el);

function App()
{
return <h1>Hi there!</h1>
}

root.render(<App />);

0 comments on commit 205dd68

Please sign in to comment.