Files
MyBlog-Next/.github/workflows/ci.yml
T
Sat Naing 2bc9296732 build: add read permission in ci workflow (#536)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-14 08:36:54 +07:00

51 lines
964 B
YAML

name: CI
permissions:
contents: read
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
workflow_call:
jobs:
build:
name: Code standards & build
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
matrix:
node-version: [20]
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v4
- name: "📦 Install pnpm"
uses: pnpm/action-setup@v4
with:
version: 10.11.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: "📦 Install dependencies"
run: pnpm install
- name: "🔎 Lint code"
run: pnpm run lint
- name: "📝 Checking code format"
run: pnpm run format:check
- name: "🚀 Build the project"
run: pnpm run build