cheatingchelsea/.forgejo/workflows/ci.yml
Derek Slenk 8f19d43632
Some checks failed
Deploy / deploy (push) Failing after 7m33s
CI / test (push) Has been cancelled
Add Next.js build caching to CI/CD workflows
2025-07-16 14:28:39 -04:00

39 lines
No EOL
1,003 B
YAML

name: CI
on:
push:
branches: [ main, master, feature/* ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Next.js build
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Run type checking
run: npm run typecheck
- name: Build application
run: npm run build
env:
# Use empty string for YOUTUBE_API_KEY during CI build
YOUTUBE_API_KEY: ""