Skip to content

chore: release master #1023

chore: release master

chore: release master #1023

name: PR - Client Preview
on:
pull_request:
branches:
- master
- '!release-please**'
paths:
- 'client/**'
- 'api/src/@shared/**'
env:
NODE_VERSION: '20'
PNPM_VERSION: 8
jobs:
deploy-vercel:
name: Vercel
runs-on: ubuntu-latest
if: contains(fromJson('["ved-bot"]'), github.actor) == false
env:
VERCEL_TOKEN: '${{ secrets.VERCEL_TOKEN }}'
VERCEL_ORG_ID: '${{ vars.VERCEL_ORG_ID }}'
VERCEL_PROJECT_ID: '${{ vars.VERCEL_PROJECT_ID }}'
steps:
- name: Check Vercel Token
if: env.VERCEL_TOKEN == ''
run: |
echo 'The owner of this repository didn't set the VERCEL_TOKEN secret!'
exit 1
- name: Check Vercel Org ID
if: env.VERCEL_ORG_ID == ''
run: |
echo 'The owner of this repository didn't set the VERCEL_ORG_ID secret!'
exit 1
- name: Check Vercel Project ID
if: env.VERCEL_PROJECT_ID == ''
run: |
echo 'The owner of this repository didn't set the VERCEL_PROJECT_ID secret!'
exit 1
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install packages
run: pnpm install
- name: Init
run: pnpm run init --no-db-push
- name: Deploy Preview to Vercel
id: vercel-action
uses: amondnet/vercel-action@v25
with:
github-token: '${{ secrets.GH_BOT_TOKEN }}'
vercel-token: '${{ secrets.VERCEL_TOKEN }}'
vercel-org-id: '${{ vars.VERCEL_ORG_ID }}'
vercel-project-id: '${{ vars.VERCEL_PROJECT_ID }}'
- name: preview-url
run: |
echo ${{ steps.vercel-action.outputs.preview-url }}