Skip to content

Commit

Permalink
fix github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur-eren committed Mar 3, 2025
1 parent 769124f commit af6ae02
Show file tree
Hide file tree
Showing 7 changed files with 1,948 additions and 45 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,31 @@ jobs:
uses: actions/checkout@v3

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

- name: Install yarn
run: npm install -g yarn

- name: Prepare L1
run: |
npm install
npm run build
working-directory: l1

- name: Prepare Operator
run: |
npm install
npm run compile
working-directory: operator

- name: Install dependencies
run: yarn install
working-directory: dashboard
env:
# We have to disable immutable installs because the hash of operator will change
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Format Check
run: yarn format:check
Expand All @@ -41,3 +59,5 @@ jobs:
- name: Build the project
run: yarn build
working-directory: dashboard
env:
OPERATOR_STATE_PATH: ./public/state.json
17 changes: 16 additions & 1 deletion dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ It is built using [NextJS](https://nextjs.org/), [React](https://react.dev/), [T

## Development

### Prepare L1 package

- CD into the `l1` directory
- Run `npm install`
- Run `npm run build`

### Prepare Operator package

- CD into the `operator` directory
- Run `npm install`
- Run `npm run compile`

### Run Dashboard

Create an `.env` file in the root directory of the project and fill in the required values from the `.env.example` file.

Install the dependencies by running:
Expand Down Expand Up @@ -36,8 +50,9 @@ To start the production server, run:
yarn start
```

# Deployment to Cloud Services (Vercel, Netlify, AWS Amplify etc.)
## Deployment to Cloud Services (Vercel, Netlify, AWS Amplify etc.)

- Set up the deployment environment variables in the cloud service provider's dashboard.
- Either deploy the project manually or set up automatic deployments from git branches.
- If the project is not recognized as a NextJS project, you may need to set up the build command and the output directory manually.
- Setup build scripts to include the L1 and Operator packages in the build process.
4 changes: 0 additions & 4 deletions dashboard/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ const nextConfig: NextConfig = {
ssr: true,
},
},
typescript: {
// TODO: Remove this when the issue is fixed
ignoreBuildErrors: true,
},
};

export default nextConfig;
1 change: 1 addition & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@uniswap/eslint-config": "^1.2.0",
"eslint": "^8.55.0",
"eslint-config-next": "15.2.0",
"operator": "file:../operator",
"prettier": "^3.5.2",
"typescript": "^5.7.3"
},
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/types/state.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// We can disregard this rule since it's type-only export
// eslint-disable-next-line no-restricted-syntax
export type * from '../../../operator/src/state';
export type * from 'operator';

import {DepositBatch, L1TxStatus, L2TxStatus, WithdrawalBatch} from '../../../operator/src/state';
import {DepositBatch, L1TxStatus, L2TxStatus, WithdrawalBatch} from 'operator';

export type TxStatus = L1TxStatus['status'] | L2TxStatus['status'];

Expand Down
Loading

0 comments on commit af6ae02

Please sign in to comment.