Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: cssnr
7 changes: 7 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ paths:
- '"inputs" section is alias node but mapping node is expected'
- '"paths" section must be sequence node but got alias node with "" tag'
- '"paths-ignore" section must be sequence node but got alias node with "" tag'
.github/workflows/issue.yaml:
ignore:
- 'missing input "app-id" which is required by action "actions/create-github-app-token@v3"'
- 'input "client-id" is not defined in action "actions/create-github-app-token@v3"'
.github/workflows/test.yaml:
ignore:
- 'property ".+" is not defined in object type'
16 changes: 9 additions & 7 deletions .github/workflows/issue.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Issue"
name: "AI Issue"

on:
issues:
Expand All @@ -9,10 +9,12 @@ jobs:
name: "Issue"
if: ${{ !github.event.issue.type || github.event.issue.type.name == 'Bug' }}
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 15

permissions:
contents: write
issues: write

steps:
- name: "Checkout"
uses: actions/checkout@v6
Expand All @@ -21,22 +23,22 @@ jobs:
id: app
uses: actions/create-github-app-token@v3
with:
app-id: 146360
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: "AI Issue"
uses: smashedr/ai-issue-action@master
uses: cssnr/ai-issue-action@v1
env:
GOOGLE_GENERATIVE_AI_API_KEY: ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
with:
token: ${{ steps.app.outputs.token }}
model: gemini-2.5-flash
tail: |
_Response generated by the [AI Issue Action](https://github.com/cssnr/ai-issue-action)._
instructions: |
You are a helpful assistant responding to a GitHub Issue created by user @${{ github.actor }}
in the repository ${{ github.server_url }}/${{ github.repository }}
Provide initial triage and troubleshooting steps, then gather any additional information needed to proceed.
Respond using your general knowledge and the following knowledge files:
file: |
path: |
README.md
tail: |
_Response generated by the [AI Issue Action](https://github.com/smashedr/ai-issue-action)._
25 changes: 11 additions & 14 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: "Lint"
on:
workflow_dispatch:
push:
branches: [master]
branches: [master, main]
pull_request:
branches: [master]
branches: [master, main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,9 +14,9 @@ concurrency:
jobs:
lint:
name: "Lint"
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}

steps:
- name: "Checkout"
Expand All @@ -31,29 +31,26 @@ jobs:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"

- name: "Setup Node 24"
- name: "Setup Node"
uses: actions/setup-node@v6
with:
node-version: 24

- name: "Install"
run: |
npm ci
id: install
run: npm ci

- name: "Build"
if: ${{ !cancelled() }}
run: |
npm run build
- name: "Debug"
continue-on-error: true
run: ls -lahR dist

- name: "eslint"
if: ${{ !cancelled() }}
run: |
npm run lint:check
run: npm run lint

- name: "prettier"
if: ${{ !cancelled() }}
run: |
npm run prettier:check
run: npm run prettier:check

- name: "yamllint"
if: ${{ !cancelled() }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Pages"
on:
workflow_dispatch:
push:
branches: [master]
branches: [master, main]
paths:
- ".github/workflows/pages.yaml"
- "public/**"
Expand All @@ -24,16 +24,15 @@ concurrency:
jobs:
build:
name: "Build"
if: ${{ !contains(github.event.head_commit.message, '#nodeploy') || github.actor != 'dependabot[bot]' }}
if: ${{ !contains(github.event.head_commit.message, '#nodeploy') }}
uses: cssnr/workflows/.github/workflows/npm-build.yaml@master
permissions:
contents: read
with:
build: "npm run build"
path: "dist"
pages: true
secrets:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
secrets: inherit

deploy:
name: "Deploy"
Expand All @@ -54,7 +53,7 @@ jobs:
id: deployment
uses: actions/deploy-pages@v5

- name: "Send Discord Notification"
- name: "Send Deploy Notification"
if: ${{ !cancelled() }}
continue-on-error: true
uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Preview"
on:
workflow_dispatch:
push:
branches-ignore: [master]
branches-ignore: [master, legacy]
paths:
- ".github/workflows/preview.yaml"
- "public/**"
Expand All @@ -27,8 +27,7 @@ jobs:
with:
build: "npm run build"
path: "dist"
secrets:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
secrets: inherit

deploy:
name: "Deploy"
Expand Down
5 changes: 2 additions & 3 deletions .github/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
extends: relaxed

ignore:
- "node_modules/"
ignore-from-file: .gitignore

rules:
line-length:
max: 119
max: 120
8 changes: 7 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
.github/pull_request_template.md
# Tools
dist/
package-lock.json

# Files
.github/disabled/
.github/PULL_REQUEST_TEMPLATE/
.github/pull_request_template.md
57 changes: 20 additions & 37 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,37 @@
# Agents - cssnr-vue (cssnr.github.io)

Before answering any question that involves facts about ANYTHING, you MUST output at least one Read, WebFetch, or WebSearch tool call.
If your first output is text instead of a tool call, you have failed.

Vue 3 SPA — GitHub Pages org site showcasing CSSNR projects.

Production Site: https://cssnr.github.io/

## Commands

| Command | Action |
| ------------------------ | ---------------------------------- |
| `npm run dev` | Dev server at localhost:5173 |
| `npm run tsc` | TypeScript check `vue-tsc --build` |
| `npm run build` | `tsc` then `vite-ssg build` |
| `npm run lint` | ESLint Write `--cache --fix` |
| `npm run lint:check` | ESLint Check |
| `npm run prettier` | Prettier Write |
| `npm run prettier:check` | Prettier Check |

Run `lint` before `tsc` before `build`. No test framework exists.

## Config & formatting

- ESLint: flat config at `eslint.config.ts` (ESLint 10)
- Prettier: `.prettierrc.json` — no semis, single quotes, `.vue` printWidth 120, `.js` tabWidth 4
- Lint CI checks: `lint:check` + `prettier:check` + yamllint + actionlint
- Path alias `@/` → `src/`

| Script | Command |
| ---------- | ------------------------------------- |
| yamllint | `yamllint -c .github/yamllint.yaml .` |
| actionlint | `actionlint` |
| Command | Action |
| -------------------- | ---------------------------------- |
| `npm run dev` | Dev server at localhost:5173 |
| `npm run tsc` | TypeScript check `vue-tsc --build` |
| `npm run build` | `tsc` then `vite-ssg build` |
| `npm run lint` | ESLint Write `--cache --fix` |
| `npm run lint:check` | ESLint Check |
| `npm run prettier` | ALWAYS RUN AFTER EDITING FILES |

## Architecture

- `src/config/apps.ts` — list of apps
- `src/router/index.ts` — vue router
- `src/components` - Vue Components
- `src/views` - Main Views (Pages)

## Environment

Copy `.env` from the template (not committed). Vars are `VITE_TITLE`, `VITE_*_URL`, etc. Injected via `%VITE_TITLE%` in `index.html` and `import.meta.env.VITE_*` in code.

## CI
## Frameworks

Workflows in: `.github/workflows`
- Bootstrap 5.3
- Fontawesome
- Animate.css
- AOS (Animate On Scroll)

- `pages.yaml`: push to `master` → npm build → deploy to GitHub Pages
- `preview.yaml`: push non-master → npm build → deploy to `https://dev-static.cssnr.com/`
- `lint.yaml`: push/PR to master → lint check

## Notes
## Environment

- Node: `^20.19.0 || >=22.12.0`, package manager: npm
- `src/config/**` marked `linguist-vendored` in `.gitattributes`
- `vite.config.ts` sets `server.allowedHosts: true` and `base` is unset (default `/` for GitHub Pages)
Copy `.env` from the template (not committed). Vars are `VITE_TITLE`, `VITE_*_URL`, etc. Injected via `%VITE_TITLE%` in `index.html` and `import.meta.env.VITE_*` in code.
Loading
Loading