ADD: image upload #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Next.js to Vercel | |
on: | |
push: | |
branches: | |
- main # or your deployment branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 # or your Node.js version | |
- name: Install dependencies | |
run: npm install | |
- name: Generate Prisma client | |
run: npx prisma generate | |
- name: Build Next.js app | |
run: npm run build | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
# Add any other env variables your app needs | |
- name: Deploy to Vercel | |
uses: amondnet/vercel-action@v20 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
working-directory: ./ | |
env: | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} |