Skip to content

update workflow

update workflow #2

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Harper CLI
run: npm install -g harperdb
- name: Deploy
env:
HDB_TARGET: ${{ secrets.HDB_TARGET }}
HDB_USERNAME: ${{ secrets.HDB_USERNAME }}
HDB_PASSWORD: ${{ secrets.HDB_PASSWORD }}
run: |
REPO_URL="https://github.com/${{ github.repository }}#${{ github.sha }}"
echo "Deploying from: $REPO_URL"
harperdb deploy \
target="$HDB_TARGET" \
username="$HDB_USERNAME" \
password="$HDB_PASSWORD" \
project=nextjs-example \
package="$REPO_URL"