-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
231 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy Client | ||
|
||
on: | ||
push: | ||
paths: | ||
- "apps/client/**" | ||
- "packages/db/**" | ||
- "packages/order-queue/**" | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: SSH and deploy | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
run: | | ||
echo "$SSH_PRIVATE_KEY" > keyfile | ||
chmod 600 keyfile | ||
ssh -o StrictHostKeyChecking=no -t -i keyfile [email protected] "sudo bash /home/ubuntu/offchain-orderbook/apps/client/deploy.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy Express Backend | ||
|
||
on: | ||
push: | ||
paths: | ||
- "apps/server/**" | ||
- "packages/db/**" | ||
- "packages/order-queue/**" | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: SSH and deploy | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
run: | | ||
echo "$SSH_PRIVATE_KEY" > keyfile | ||
chmod 600 keyfile | ||
ssh -o StrictHostKeyChecking=no -t -i keyfile [email protected] "sudo bash /home/ubuntu/offchain-orderbook/apps/server/deploy.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
"use client" | ||
"use client"; | ||
|
||
import OrderBook from '@/components/landing/Orderbook'; | ||
import { useParams } from 'next/navigation' | ||
import OrderBook from "@/components/landing/Orderbook"; | ||
import { useParams } from "next/navigation"; | ||
/* | ||
TODO: | ||
1. server actiosn to fetch the event from the event id (not sure but for now). | ||
2. Add sources of truth. | ||
3. Add event details like name and all. | ||
*/ | ||
export default function Page() { | ||
const {id} = useParams() | ||
const { id } = useParams(); | ||
console.log(id); | ||
const eventId = Array.isArray(id) ? id[id.length - 1] : id; | ||
|
||
|
||
if (!eventId) { | ||
return <div>Error: Event ID not found</div>; | ||
} | ||
return <div> | ||
<OrderBook eventId = {eventId}/> | ||
</div> | ||
} | ||
return ( | ||
<div> | ||
<OrderBook eventId={eventId} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
export PATH=$PATH:/home/ubuntu/.nvm/versions/node/v18.20.4/bin | ||
|
||
cd /home/ubuntu/offchain-orderbook | ||
git pull origin master | ||
npm run build | ||
pm2 stop client | ||
pm2 start npm --name "client" -- run "start:client" |
Oops, something went wrong.