Skip to content

Update action

Update action #2

name: www.tlip.io Preview Build and Deploy
on: [pull_request, push]
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run Linting
run: npm run lint
- name: Run Svelte-Check
run: npm run check
- name: Run Build
run: npm run build
- name: Deploy to Vercel
uses: BetaHuhn/deploy-to-vercel-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_SCOPE: ${{ secrets.VERCEL_SCOPE }}
ALIAS_DOMAINS: ${{ secrets.DOMAIN }}
PRODUCTION: false