added feature branch build #47
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: CI/CD | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: push | |
jobs: | |
deploy-blog: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- run: yarn | |
- run: yarn workspace @digital-garden/blog run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- run: yarn workspace @digital-garden/blog run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- run: yarn workspace @digital-garden/blog run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | |
build: | |
runs-on: ubuntu-latest | |
if: github.ref != 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: corepack enable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- run: yarn | |
- run: yarn build |