From c2b929d5c86dfe5788f96310ad258323cb0d58a8 Mon Sep 17 00:00:00 2001 From: Bima Sakti Krisdianto <67643310+bimasaktikr@users.noreply.github.com> Date: Wed, 22 May 2024 13:44:24 +0700 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad4d307..997ddcc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,3 @@ -name: CI/CD with Next.js - on: push: branches: @@ -10,17 +8,20 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install - - name: Install dependencies - run: npm install + - name: Build the Next.js app + run: npm run build - - name: Build the Next.js app - run: npm run build + - name: Set up SSH + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Deploy to cPanel - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.DEPLOY_KEY }} - publish_dir: ./out + - name: Deploy to cPanel + run: | + scp -r ./out/* @: