Skip to content

frontend CI

frontend CI #2

Workflow file for this run

name: 'frontend CI'
on:
push:
paths:
- './**'
pull_request:
paths:
- './**'
workflow_dispatch:
env:
ALIAS_DOMAIN_PREV: 'tokenscript-doc.vercel.app'
ALIAS_DOMAIN_PROD: ''
PROJ_PATH: '.'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: latest
package_json_file: '${{ env.PROJ_PATH }}/package.json'
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: ${{ env.PROJ_PATH }}/pnpm-lock.yaml
- run: |
echo -n "Node version: "
node -v
echo -n "Npm version: "
npm -v
deploy:
runs-on: ubuntu-latest
if: ${{ contains(
fromJson('["push", "workflow_dispatch"]'),
github.event_name) &&
contains(
fromJson('["main", "prod"]'),
github.ref_name)
}}
steps:
- uses: actions/checkout@v4
- name: Deploy to Vercel Action
uses: BetaHuhn/deploy-to-vercel-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
GITHUB_DEPLOYMENT_ENV: ${{ github.ref_name == 'prod' && 'production' || 'preview' }}
PRODUCTION: ${{ github.ref_name == 'prod' }}
ALIAS_DOMAINS: ${{ github.ref_name == 'prod' && env.ALIAS_DOMAIN_PROD || env.ALIAS_DOMAIN_PREV }}
VERCEL_SCOPE: 'smart-token-labs'