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 a3c28b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 56 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/deploy-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,55 @@ 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:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Install dependencies
run: |
npm install --dev
npm ci
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 -t ${{ secrets.VERCEL_TOKEN }})"
npx vercel alias -S corbado -t ${{ secrets.VERCEL_TOKEN }} "$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
url="$(npx vercel deploy -t ${{ secrets.VERCEL_TOKEN }})"
npx vercel alias -S corbado -t ${{ secrets.VERCEL_TOKEN }} "$url" $BRANCH_NAME.react.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 a3c28b0

Please sign in to comment.