Skip to content

feat: set up dev/production branching with CI and release workflows #5

feat: set up dev/production branching with CI and release workflows

feat: set up dev/production branching with CI and release workflows #5

Workflow file for this run

name: Release
on:
push:
branches: [production]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm -r typecheck
- name: Test
run: pnpm test
- name: Build
run: pnpm -r build
- name: Create Release PR or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset publish
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deploy website to Vercel
if: steps.changesets.outputs.published == 'true'
run: |
npx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
npx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
npx vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
working-directory: website
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}