Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
indpurvesh committed Oct 7, 2024
1 parent 87d14a3 commit ffe2359
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI/CD

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'react-front'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

deploy:
needs: build
runs-on: ubuntu-latest

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

- name: Copy files via ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "./react-front/dist"
target: ${{ secrets.REACT_TARGET_PATH }}

8 changes: 4 additions & 4 deletions react-front/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VITE_AVORED_FRONTEND_BASE_URL=http://localhost:5173
VITE_AVORED_BACKEND_BASE_URL=http://localhost:8081
#VITE_AVORED_FRONTEND_BASE_URL=http://localhost:5173
#VITE_AVORED_BACKEND_BASE_URL=http://localhost:8081

#VITE_AVORED_FRONTEND_BASE_URL=https://avored.com
#VITE_AVORED_BACKEND_BASE_URL=https://proavored.avored.com
VITE_AVORED_FRONTEND_BASE_URL=https://avored.com
VITE_AVORED_BACKEND_BASE_URL=https://api.avored.com
2 changes: 1 addition & 1 deletion react-front/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import App from './App'
import './index.css'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

Expand Down

0 comments on commit ffe2359

Please sign in to comment.