Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- 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
run: |
scp -r ./out/* <USERNAME>@<HOST>:<REMOTE_DIR>