diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml new file mode 100644 index 0000000..76a06c4 --- /dev/null +++ b/.github/workflows/pr-preview.yml @@ -0,0 +1,26 @@ +name: PR Preview Deploy + +on: + pull_request: + types: [opened, synchronize, reopened, closed, merged] + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Deploy to Preview Environment + run: npx trigger.dev@0.0.0-re2-20250523160855 deploy --env preview -a https://matt-webapp.trigger.dev --self-hosted + env: + TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}