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
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: demo deployement

on:
push:
branches: [ "main" ]
paths:
- 'client/**'
- 'server/**'

jobs:
build-and-deploy-client:
name: Build and Deploy Client
runs-on: amazonlinux-2

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Build client
run: |
cd client
npm install --legacy-peer-deps
npm run build

- name: Deploy client
uses: easingthemes/ssh-deploy@v2

Check warning on line 26 in .github/workflows/main.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/main.yml#L26

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
REMOTE_HOST : ${{ secrets.SERVER_IP }}
REMOTE_USER : ${{ secrets.FE_USER }}
SSH_PRIVATE_KEY : ${{ secrets.EC2_FE_SSH_KEY }}
SOURCE : 'client/build'
TARGET : '/home/hackathon-test'
2 changes: 1 addition & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
AssistantsList,
AssistantsChatPage,
ChatPage,
AssistantFileDownloadPage,
AssistantFileDownloadPage
} from "./Pages";

import Layout from "./Pages/Layout";
Expand Down
6 changes: 5 additions & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import assistantThreadRouter from './routers/assistantThreadRoutes.js';
import teamRouter from "./routers/teamRoutes.js";
import organizationRouter from "./routers/organizationRoutes.js";
import { errorLogger } from "./middlewares/errorMiddleware.js";
import { initSetup } from './controllers/initController.js'
import { initSetup } from './controllers/initController.js';

const app = express();
app.use(cors({
Expand All @@ -39,6 +39,10 @@ app.get("/", (req, res) => {
var upload = multer();






app.post("/api/init", initSetup);
app.use("/api/auth", router);
app.use("/api/user", userRouter);
Expand Down