Skip to content

ci: 💚 Upgrade the action-setup version to resolve the tim… #449

ci: 💚 Upgrade the action-setup version to resolve the tim…

ci: 💚 Upgrade the action-setup version to resolve the tim… #449

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
jobs:
build:
name: Build and Deploy to Vercel
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
check-latest: true
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- uses: pnpm/[email protected]
with:
run_install: |
args: [--frozen-lockfile, --strict-peer-dependencies]
timeout-minutes: 10
- name: Codegen
run: pnpm codegen
timeout-minutes: 5
- name: Test
run: pnpm test
timeout-minutes: 15
- name: Build
run: pnpm build
timeout-minutes: 15
- name: Deploy to Vercel (Staging)
if: ${{ github.ref != 'refs/heads/main' }}
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
github-comment: false
timeout-minutes: 5
- name: Deploy to Vercel (Production)
if: ${{ github.ref == 'refs/heads/main' }}
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: --prod
working-directory: ./dist
github-comment: false
timeout-minutes: 5