fix(cd): use proper environment name #2
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 | |
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 }} |