Skip to content

Commit

Permalink
Update vercel deployment to branch deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
incorbador committed Dec 12, 2023
1 parent 79a7551 commit 3b4361f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 61 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/deploy-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Deploy examples to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

on:
push:
branches:
- main
#- 56-setup-deployment-to-vercel
- feature-73-vercel-branch-deployments

jobs:
deploy:
Expand All @@ -26,31 +27,30 @@ jobs:

- name: Install dependencies
run: |
npm install --dev
npm install
npm install lerna
npm install vercel
- name: Build SDKs
run: |
npm install
lerna run build_and_publish:local
npm run build:dev
- name: Deploy react-sdk-example to Vercel
run: |
cd playground/react-sdk-example
npm install
npx yalc add @corbado/web-core && npx yalc add @corbado/react-sdk
npm run build
npx vercel deploy --token ${{ secrets.VERCEL_TOKEN }} --prod
url="$(npx vercel deploy --token ${{ secrets.VERCEL_TOKEN }})"
npx vercel alias "$url" $BRANCH_NAME.react-sdk.passkeys.de
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_REACT_SDK }}

- name: Deploy react-example to Vercel
run: |
cd playground/react-example
npm install
npx yalc add @corbado/web-core && npx yalc add @corbado/react-sdk && npx yalc add @corbado/react
npm run build
npx vercel deploy --token ${{ secrets.VERCEL_TOKEN }} --prod
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_REACT }}
#- name: Deploy react-example to Vercel
# run: |
# cd playground/react-example
# npm install
# npm run build
# npx vercel deploy --token ${{ secrets.VERCEL_TOKEN }} --prod
# npx vercel alias "$url" $BRANCH_NAME.react-sdk.passkeys.de
# env:
# VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_REACT }}
46 changes: 0 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b4361f

Please sign in to comment.