-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.11 KB
/
preview-build-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: www.tlip.io Preview Build and Deploy
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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: Create Dummy Env
run: cp .env.example .env
- name: Run Dist
run: npm run dist
- name: Deploy to Vercel
uses: iFixit/deploy-to-vercel-action@master
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 }}
PRODUCTION: false