Skip to content

Commit

Permalink
fix deploy error and disable github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal authored Jul 23, 2024
2 parents 3746540 + 2db859a commit 1117ed6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Deploy to cPanel

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

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

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

- name: Install lftp
run: sudo apt install lftp

- name: Configure lftp
run: |
mkdir ~/.lftp
echo "set ssl:verify-certificate false;" >> ~/.lftp/rc
- name: Load Secrets
run: |
echo "machine ${{ secrets.FTP_SERVER }} login ${{ secrets.FTP_USERNAME }} password ${{ secrets.FTP_PASSWORD }}" > ~/.netrc
- name: Install dependencies and build
env:
VITE_SERVER_URL: ${{ secrets.VITE_SERVER_URL }}
VITE_SYNCFUSION_KEY: ${{ secrets.VITE_SYNCFUSION_KEY }}
run: |
cd client
npm install
npm run build
- name: Upload contents of dist folder
run: |
lftp -e "mirror --only-newer --parallel=100 -R ./client/dist/ /debateme.shubhamlal.in/" ${{ secrets.FTP_SERVER }}
# - name: Upload backend
# run: |
# lftp -e "mirror --only-newer --parallel=100 -R ./server/ /debateme-api/" ${{ secrets.FTP_SERVER }}
# name: Deploy to cPanel

# on:
# push:
# branches:
# - main

# jobs:
# deploy:
# runs-on: ubuntu-latest

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

# - name: Setup Node.js environment
# uses: actions/setup-node@v2
# with:
# node-version: '20.10.0'

# - name: Install lftp
# run: sudo apt install lftp

# - name: Configure lftp
# run: |
# mkdir ~/.lftp
# echo "set ssl:verify-certificate false;" >> ~/.lftp/rc

# - name: Load Secrets
# run: |
# echo "machine ${{ secrets.FTP_SERVER }} login ${{ secrets.FTP_USERNAME }} password ${{ secrets.FTP_PASSWORD }}" > ~/.netrc

# - name: Install dependencies and build
# env:
# VITE_SERVER_URL: ${{ secrets.VITE_SERVER_URL }}
# VITE_SYNCFUSION_KEY: ${{ secrets.VITE_SYNCFUSION_KEY }}
# run: |
# cd client
# npm install
# npm run build

# - name: Upload contents of dist folder
# run: |
# lftp -e "mirror --only-newer --parallel=100 -R ./client/dist/ /debateme.shubhamlal.in/" ${{ secrets.FTP_SERVER }}

# - name: Upload backend
# run: |
# lftp -e "mirror --only-newer --parallel=100 -R ./server/ /debateme-api/" ${{ secrets.FTP_SERVER }}
2 changes: 2 additions & 0 deletions client/src/pages/auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export default function AuthPage() {
navigate('/auth?type=signup', { replace: true });
}
}, [isAuthenticated, location.search, navigate, route, setAuthTab, setTempUser]);

return <></>
}

0 comments on commit 1117ed6

Please sign in to comment.