Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bimasaktikr authored May 22, 2024
1 parent 89c2b1f commit c2b929d
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: CI/CD with Next.js

on:
push:
branches:
Expand All @@ -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/* <USERNAME>@<HOST>:<REMOTE_DIR>

0 comments on commit c2b929d

Please sign in to comment.