build: 💚 update vercel config #1
Workflow file for this run
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
name: Deploy to Vercel | ||
on: | ||
push: | ||
branches: [config_vercel] # Production deployment | ||
branches-ignore: [config_vercel] # Preview deployments for all other branches | ||
jobs: | ||
# deploy-frontend: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Install dependencies | ||
# run: yarn install | ||
# - name: Build frontend | ||
# run: yarn nx build fe | ||
# - name: Install Vercel CLI | ||
# run: npm install -g vercel | ||
# - name: Pull Vercel cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: ~/.vercel | ||
# key: ${{ runner.os }}-vercel-fe-${{ hashFiles('vercel.json') }} | ||
# - name: Deploy frontend with Vercel | ||
# run: vercel --prod -s tasktr-fe ${{ github.ref != 'refs/heads/main' && '--prebuilt' || '' }} | ||
# env: | ||
# VERCEL_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }} | ||
deploy-backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Build backend | ||
run: yarn nx build be && yarn nx build fe | ||
- name: Install Vercel CLI | ||
run: npm install -g vercel | ||
- name: Pull Vercel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.vercel | ||
key: ${{ runner.os }}-vercel-be-${{ hashFiles('vercel.json') }} | ||
- name: Deploy backend with Vercel | ||
run: vercel --prod -s tasktr-be ${{ github.ref != 'refs/heads/main' && '--prebuilt' || '' }} | ||
env: | ||
VERCEL_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }} |