Skip to content

Commit

Permalink
deploy via GH actions and not vercel automatics
Browse files Browse the repository at this point in the history
  • Loading branch information
c0repwn3r committed Mar 21, 2024
1 parent 872d7fd commit 1ffe642
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 21 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy tagged releases
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
jobs:
migrate:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: npm install
- name: Apply all pending migrations to the database
run: npx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/migrate.yml

This file was deleted.

5 changes: 4 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"crons": [
{ "path": "/api/cron/roster", "schedule": "0 * * * *" },
{ "path": "/api/cron/connections", "schedule": "* * * * *" }
]
],
"git": {
"deploymentEnabled": false
}
}

0 comments on commit 1ffe642

Please sign in to comment.