Skip to content

Commit

Permalink
vecel deployment config added
Browse files Browse the repository at this point in the history
  • Loading branch information
CA-MKSingh committed Oct 30, 2024
1 parent 0d6c4b7 commit a12219c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# vercel-deploy.yml
name: Deploy to vercel on merge
on:
push:
branches:
- trunk
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-args: "--prod"
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJ_ID}}
25 changes: 25 additions & 0 deletions .github/workflows/vercel-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# vercel-pull-request.yml
name: Create vercel preview URL on pull request
on:
pull_request:
branches:
- trunk
jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- uses: actions/checkout@v4
- uses: amondnet/vercel-action@v20
id: vercel-deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJ_ID }}
- name: preview-url
run: |
echo ${{ steps.vercel-deploy.outputs.preview-url }}
2 changes: 0 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
output: "export",
images: {
unoptimized: true,
remotePatterns: [
{
protocol: "https",
Expand Down

0 comments on commit a12219c

Please sign in to comment.