Skip to content

Commit

Permalink
initial commit with workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
profikid committed Oct 13, 2024
1 parent 86cbce2 commit f565c93
Show file tree
Hide file tree
Showing 8 changed files with 1,785 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/release-trigger-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy to Trigger.dev (self-hosted)

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install dependencies
run: npm install

# docker setup - part 1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# docker setup - part 2
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🚀 Deploy Trigger.dev
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
TRIGGER_DEV_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
# required when self-hosting
TRIGGER_API_URL: ${{ secrets.TRIGGER_API_URL }}
# deploy with additional flags
run: |
npx trigger.dev@latest deploy --self-hosted --push
41 changes: 41 additions & 0 deletions .github/workflows/release-trigger-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy to Trigger.dev (self-hosted)

# Requires manually calling the workflow from a branch / commit to deploy to staging
on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install dependencies
run: npm install

# docker setup - part 1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# docker setup - part 2
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🚀 Deploy Trigger.dev
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
TRIGGER_DEV_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
# required when self-hosting
TRIGGER_API_URL: ${{ secrets.TRIGGER_API_URL }}
# deploy with additional flags
run: |
npx trigger.dev@latest deploy --env staging --self-hosted --push
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.trigger
node_modules
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# generic-triggers
# generic-triggers

- just some integrations and building blocks for ai related
Loading

0 comments on commit f565c93

Please sign in to comment.