-
Notifications
You must be signed in to change notification settings - Fork 21
43 lines (35 loc) · 1.1 KB
/
ts-typechecking.yml
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
name: TS - Check Types & Style
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
ts-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
lfs: true
- name: Set up Node + Yarn
uses: actions/setup-node@v3
with:
cache: 'yarn'
# https://nextjs.org/docs/advanced-features/ci-build-caching
- name: Cache NextJS Files
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Install JS Dependencies
run: yarn install --frozen-lockfile
- name: Run Check
run: yarn next build