feat: welcome people to hctv through a workflow

This commit is contained in:
2025-03-16 16:47:08 +01:00
parent 95e821727b
commit c702db9121
5 changed files with 11 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ jobs:
tags: latest
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile

2
.gitignore vendored
View File

@@ -27,7 +27,7 @@ yarn-error.log*
# local env files
.env*.local
.env*
.env*
# vercel
.vercel

View File

@@ -12,7 +12,8 @@
"db:generate": "prisma generate",
"db:migrate": "prisma migrate dev --name",
"ui:add": "shadcn add",
"prepare": "next-ws patch"
"prepare": "next-ws patch",
"act": "act --secret-file .env.ci"
},
"dependencies": {
"@hookform/resolvers": "^3.9.1",

View File

@@ -20,6 +20,7 @@ export default function OnboardingClient() {
</CardHeader>
<CardContent>
<h1 className='text-red-500 animate-pulse animate-bounce'>REFRESH THE SITE AFTER SUBMITTING THE FORM!!</h1>
<p>join #hctv! you will get welcomed to the channel after submitting the form!</p>
<UniversalForm
fields={[
{ name: 'userId', label: 'User ID', type: 'hidden', value: user?.id },

View File

@@ -89,5 +89,11 @@ export async function onboard(prev: any, formData: FormData) {
});
await initializeStreamInfo(createdChannel.id);
await fetch(process.env.WELCOME_WORKFLOW_URL!, {
body: JSON.stringify({
username: zod.data.username,
}),
})
return { success: true };
}