Skip to content

Commit 27d1237

Browse files
rename workflow
1 parent d8c1a32 commit 27d1237

File tree

2 files changed

+76
-76
lines changed

2 files changed

+76
-76
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Install Harper CLI
26+
run: npm install -g harperdb
27+
28+
- name: Setup Harper
29+
env:
30+
TC_AGREEMENT: 'yes'
31+
HDB_ADMIN_USERNAME: 'admin'
32+
HDB_ADMIN_PASSWORD: 'password'
33+
ROOTPATH: '/tmp/hdb'
34+
OPERATIONSAPI_NETWORK_PORT: 9925
35+
LOGGING_LEVEL: 'debug'
36+
LOGGING_STDSTREAMS: true
37+
THREADS_COUNT: 1
38+
THREADS_DEBUG: false
39+
run: harperdb install
40+
41+
- name: Deploy data
42+
run: |
43+
harperdb start
44+
sleep 10
45+
harperdb deploy project=basic-data package=HarperDB/basic-data-example replicated=true
46+
sleep 10
47+
harperdb stop
48+
49+
- name: Build project
50+
run: npm run build
51+
52+
- name: Add prebuilt flag to config
53+
run: yq e '.["@harperdb/nextjs"].prebuilt = true' -i config.yaml
54+
55+
- name: Upload HarperDB logs
56+
if: always()
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: harperdb-logs
60+
path: /tmp/hdb/log/hdb.log
61+
retention-days: 7
62+
63+
- name: Deploy
64+
env:
65+
HDB_TARGET: ${{ secrets.HDB_TARGET }}
66+
HDB_USERNAME: ${{ secrets.HDB_USERNAME }}
67+
HDB_PASSWORD: ${{ secrets.HDB_PASSWORD }}
68+
run: |
69+
harperdb deploy \
70+
target="$HDB_TARGET" \
71+
username="$HDB_USERNAME" \
72+
password="$HDB_PASSWORD" \
73+
project=nextjs-example \
74+
skip_node_modules=false \
75+
restart=true \
76+
replicated=true

.github/workflows/ci.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)