mirror of
https://github.com/veeso/termscp.git
synced 2026-07-04 13:42:42 +02:00
ci(site): add format/lint/test/build workflow for astro site
Add Site GitHub Actions workflow running prettier format check, astro check, tests, and build on changes under site/. Wire prettier into the site package with config, ignore, and scripts, and format existing sources.
This commit is contained in:
43
.github/workflows/site.yml
vendored
Normal file
43
.github/workflows/site.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Site
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "site/**"
|
||||
- ".github/workflows/site.yml"
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- "site/**"
|
||||
- ".github/workflows/site.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: site
|
||||
|
||||
jobs:
|
||||
build-site:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
cache-dependency-path: site/package-lock.json
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Format
|
||||
run: npm run format:check
|
||||
- name: Lint
|
||||
run: npm run check
|
||||
- name: Test
|
||||
run: npm test --if-present
|
||||
- name: Build
|
||||
run: npm run build
|
||||
Reference in New Issue
Block a user