-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from NUS-Project-SaBai/vercel-deployment
testing vercel git hub actions
- Loading branch information
Showing
8 changed files
with
1,744 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: deploy | ||
on: | ||
pull_request: | ||
branches: | ||
- deployment | ||
workflow_dispatch: | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
- run: npm install -g pnpm | ||
- run: pnpm install | ||
- run: pnpm vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- run: pnpm vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- run: pnpm vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: preview | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
jobs: | ||
preview: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: Preview | ||
url: ${{ steps.deploy.outputs.url }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
- run: npm install -g pnpm | ||
- run: pnpm install | ||
- run: pnpm vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- run: pnpm vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- id: deploy | ||
run: echo "::set-output name=url::$(pnpm vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// Set to VERCEL_URL or override with AUTH0_BASE_URL | ||
process.env.AUTH0_BASE_URL = | ||
process.env.AUTH0_BASE_URL || process.env.VERCEL_URL; | ||
|
||
import { handleAuth } from '@auth0/nextjs-auth0'; | ||
|
||
export default handleAuth(); |
Oops, something went wrong.