Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
JUNIORCO committed Sep 4, 2024
1 parent 724beee commit b7c1204
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ jobs:
- name: Prisma Migrate Deploy
run: npx prisma migrate deploy

- name: Check for changes in trigger folder
id: check_trigger_changes
run: |
git diff --quiet HEAD^ HEAD -- app/trigger/ || echo "changes=true" >> $GITHUB_OUTPUT
- name: Trigger Deploy
if: steps.check_trigger_changes.outputs.changes == 'true'
run: npx trigger.dev@beta deploy

- name: Deploy Project Artifacts to Vercel
Expand Down
6 changes: 6 additions & 0 deletions app/actions/create-pyng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ For example, a user can set up "email <> when <a new blog post is release> for <
[EveryOption.Day]: "0 0 * * *",
};

console.log("everyOptionToCronMap", everyOptionToCronMap);

const schedulePayload = {
task: pyngTask.id,
cron: everyOptionToCronMap[data.every],
Expand All @@ -61,12 +63,16 @@ For example, a user can set up "email <> when <a new blog post is release> for <
deduplicationKey: `${pyng.id}-pyng`, //this makes it impossible to have two schedules for the same pyng
};

console.log("schedulePayload", schedulePayload);

// trigger the first run
const { id: runId } = await firstRun.trigger({
pyngId: pyng.id,
schedulePayload,
});

console.log("runId: ", runId);

const maxAttempts = 10;
const pollInterval = 1000;

Expand Down

0 comments on commit b7c1204

Please sign in to comment.