From 44ab930c514b9eb55075c36defce638c28239d96 Mon Sep 17 00:00:00 2001 From: Shubham Lal Date: Fri, 22 Dec 2023 12:43:42 +0530 Subject: [PATCH] setup deployment for cPanel --- .github/workflows/deploy.yml | 31 ------------------------------- .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index d35d3f0..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Deploy to FTP - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: 20.8.1 - - - name: Install dependencies and build Next.js app - run: | - cd client - npm install - npm run build - - - name: Deploy via FTP - run: | - lftp -e "open -u ${{ secrets.FTP_USERNAME }},${{ secrets.FTP_PASSWORD }} ${{ secrets.FTP_HOST }}; set ssl:verify-certificate no; mirror -R -e -x .git/ -x .github/ -x .next/ -x node_modules/ - - . /public_html/; bye" \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..15a565b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +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: '18' + + - name: Install dependencies and build + run: | + cd client + npm install + npm run build + + - name: Deploy via FTP + run: | + lftp -e "open -u ${{ secrets.FTP_USERNAME }},${{ secrets.FTP_PASSWORD }} ${{ secrets.FTP_HOST }}; set ssl:verify-certificate no; mirror -R -e -x .git/ -x .github/ -x .next/ -x node_modules/ \ No newline at end of file