Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/lowmess/lameass.recipes. A recipe site, but without the ads and 3,000 word essays lameass.recipes
nextjs sanity-io theme-ui typescript
Something went wrong. Try again.
1.7 kB · 78 lines
YAML
at develop
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879name: CI
on: push: branches: [main]
pull_request: # run on all PRs
jobs: lint: name: Lint JavaScript
runs-on: ubuntu-latest
steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' cache: 'npm'
- name: Install dependencies run: npm ci --omit=dev --ignore-scripts
- name: Run ESLint run: npx eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0
typecheck: name: Typecheck
runs-on: ubuntu-latest
steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' cache: 'npm'
- name: Install dependencies run: npm ci --omit=dev --ignore-scripts
- name: Run TypeScript run: npx tsc
lighthouse: name: Run Lighthouse audit
runs-on: ubuntu-latest
needs: [lint, typecheck]
steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '14' cache: 'npm'
- name: Install dependencies run: npm ci --omit=dev --ignore-scripts
- name: Get Next.js build cache uses: actions/cache@v2 with: path: ${{ github.workspace }}/.next/cache key: ${{ runner.os }}-next-${{ hashFiles('**/package-lock.json') }}
- name: Install Lighthouse CLI run: npm install -g @lhci/cli@0.4.x
- name: Build site run: SANITY_PROJECT_ID=${{ secrets.SANITY_PROJECT_ID }} npm run build
- name: Run Lighthouse CI run: lhci autorun env: LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}