Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/website-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Website Build Check

on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Jordan, my suggestion is we restrict what triggers this workflow a bit more.
My thinking is that it should only run when files related to the website have been changed.
I did this for the Docs Site workflow and it really sped things up for PRs and pushes that didn't involve docs src files.

What are your thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I completely agree, this would be a lot more efficient. Will add this change

push:
branches:
- main
- '**'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think it should run on pushes to any other branch than main since being triggered on pull requests should catch anything before we merge it in.

pull_request:

jobs:
build-website:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install
working-directory: src/website

- name: Build website
run: npm run build
working-directory: src/website
10 changes: 3 additions & 7 deletions src/website/lib/redux/logUtils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const isDevelopment = process.env.NODE_ENV === 'development';

export const clearLogsPeriodically = () => {
if (isDevelopment) {
setInterval(() => {
console.clear();
}, 60000); // Clear logs every minute
}
setInterval(() => {
console.clear();
}, 60000); // Clear logs every minute
};
6 changes: 4 additions & 2 deletions src/website/lib/redux/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as Redux from 'redux';
import { createLogger } from 'redux-logger';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const logger = createLogger({
duration: true,
timestamp: true,
Expand All @@ -13,8 +15,8 @@ const logger = createLogger({
error: () => '#ff0005',
},
predicate: () => typeof window !== 'undefined',
}) as Redux.Middleware;
});

const middleware: Redux.Middleware[] = [logger];
const middleware = [logger] as Redux.Middleware[];

export { middleware };
Loading