Skip to content

fix(cd): use proper environment name #2

fix(cd): use proper environment name

fix(cd): use proper environment name #2

Workflow file for this run

name: 🚀 Deploy
on:
push:
branches:
- main
env:
CI: 'true'
jobs:
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
uses: bahmutov/npm-install@v1
- name: Run unit tests
run: npm test
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
uses: bahmutov/npm-install@v1
- name: Lint code
run: npm run lint
typecheck:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
uses: bahmutov/npm-install@v1
- name: Transpile TypeScript
run: npm run typecheck
deploy-remix:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- unit-tests
- lint
- typecheck
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_REMIX_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
uses: bahmutov/npm-install@v1
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}