Skip to content

Commit

Permalink
Update GitHub Actions (#63)
Browse files Browse the repository at this point in the history
* Add lint workflow

* Only deploy on `main`

* `npm install rollup`

* Update actions names

* Fix linter errors and move admin table to `Table` component

* Fix last lint error
  • Loading branch information
hmellor authored Mar 6, 2024
1 parent 0abe880 commit cb947d9
Show file tree
Hide file tree
Showing 21 changed files with 387 additions and 150 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'npm'
- name: Install dependencies
run: |
npm install
- name: Lint
run: npm run lint
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to GitHub Pages
name: GitHub Pages

on:
push:
Expand All @@ -24,7 +24,6 @@ jobs:
- name: Install dependencies
run: |
npm install
npm install @rollup/rollup-linux-x64-gnu
- name: Build
run: npm run build
- name: Setup Pages
Expand All @@ -35,6 +34,7 @@ jobs:
path: './dist'

deploy:
if: github.ref == 'refs/heads/main'
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand Down
224 changes: 187 additions & 37 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
"react-router-dom": "^6.21.0"
"react-router-dom": "^6.21.0",
"rollup": "^4.12.1"
},
"devDependencies": {
"@types/react": "^18.2.43",
Expand Down
8 changes: 7 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from "prop-types";
import "./App.css";
import {
BrowserRouter as Router,
Expand All @@ -6,7 +7,7 @@ import {
Navigate,
} from "react-router-dom";
import "bootstrap/dist/css/bootstrap.min.css";
import { AutoSignIn } from "./utils/firebaseUtils";
import { AutoSignIn } from "./firebase/AutoSignIn";
import { ItemsProvider } from "./contexts/ItemsProvider";
import { ModalsProvider } from "./contexts/ModalsProvider";
import Navbar from "./components/Navbar";
Expand Down Expand Up @@ -55,4 +56,9 @@ function App() {
);
}

App.propTypes = {
children: PropTypes.arrayOf(PropTypes.element),
condition: PropTypes.bool
}

export default App;
1 change: 0 additions & 1 deletion src/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { FaGithub } from "react-icons/fa";

const Footer = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Grid.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext } from "react";
import { useContext } from "react";
import { Item } from "./Item";
import { ItemsContext } from "../contexts/ItemsProvider";

Expand Down
Loading

0 comments on commit cb947d9

Please sign in to comment.