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
2 changes: 2 additions & 0 deletions lefthook.yml → .config/lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ pre-commit:
parallel: false
commands:
oxfmt:
root: src
glob: '*.{ts,tsx,css,md,mdx,json,yml,yaml,toml}'
run: bunx oxfmt {staged_files}
oxlint:
root: src
glob: '*.{ts,tsx,js,jsx,astro}'
run: bunx oxlint --fix {staged_files}
restage:
Expand Down
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Editor configuration for the Purview-Dev website repository.
# https://editorconfig.org

root = true

[*]
Expand All @@ -19,4 +16,4 @@ trim_trailing_whitespace = false
indent_size = 2

[*.astro]
indent_size = 2
indent_size = 2
108 changes: 108 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Default: auto-detect text and normalise to LF in the index.
# Everything below only overrides the *working tree* checkout behaviour.
* text=auto

# ---------------------------------------------------------------------------
# .NET source and project files
# No eol= means each dev's core.autocrlf / core.eol decides. Set eol=lf here
# instead if you want to hard-enforce LF everywhere -- but keep it in sync
# with end_of_line in .editorconfig or `dotnet format --verify-no-changes`
# will fail in CI.
# ---------------------------------------------------------------------------
*.cs text diff=csharp
*.csx text diff=csharp
*.vb text
*.fs text
*.fsx text
*.csproj text
*.fsproj text
*.vbproj text
*.props text
*.targets text
*.resx text
*.config text
*.ruleset text
*.xaml text
*.cshtml text diff=html
*.razor text diff=html
*.sln text eol=lf
*.slnx text eol=lf

# ---------------------------------------------------------------------------
# Data, config and docs
# ---------------------------------------------------------------------------
*.json text
*.xml text
*.yml text
*.yaml text
*.toml text
*.md text diff=markdown
*.svg text
*.editorconfig text
.gitattributes text
.gitignore text

# ---------------------------------------------------------------------------
# Web assets (only relevant if the repo ships any)
# ---------------------------------------------------------------------------
*.js text
*.jsx text
*.ts text
*.tsx text
*.html text diff=html
*.css text
*.scss text

# ---------------------------------------------------------------------------
# Scripts -- these MUST be pinned regardless of platform.
# cmd.exe misparses LF in multi-line blocks and labels; sh needs LF.
# ---------------------------------------------------------------------------
*.sh text eol=lf
*.bash text eol=lf
*.zsh text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=lf
*.psm1 text eol=lf
*.psd1 text eol=lf
Dockerfile text eol=lf
*.dockerfile text eol=lf
justfile text eol=lf
Makefile text eol=lf

# Patches carry their own endings -- never touch them.
*.patch -text

# ---------------------------------------------------------------------------
# Binary
# ---------------------------------------------------------------------------
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.mp4 binary
*.zip binary
*.gz binary
*.7z binary
*.tar binary
*.exe binary
*.dll binary
*.pdb binary
*.obj binary
*.vsix binary
*.nupkg binary
*.snupkg binary
*.snk binary
*.pfx binary
*.lockb binary
*.woff binary
*.woff2 binary

# ---------------------------------------------------------------------------
# Keep repo scaffolding out of `git archive` / source packages
# ---------------------------------------------------------------------------
.gitattributes export-ignore
.gitignore export-ignore
.github/ export-ignore
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

version: 2
updates:
# The repository is a Bun workspace: the lockfile (`bun.lock`) and the
# workspace root `package.json` live at `/`; the site's dependencies are
# declared in `src/package.json` and are resolved through the root lockfile.
- package-ecosystem: npm
directory: /
schedule:
Expand Down Expand Up @@ -43,7 +46,7 @@ updates:
# major upgrades separate for review.
- dependency-name: 'oxfmt'
update-types:
- major
- version-update:semver-major

- package-ecosystem: github-actions
directory: /
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
Leave empty for a custom domain or organisation Pages site.
required: false
type: string
default: ''
default: ""
schedule:
# Weekly refresh of release information from GitHub and NuGet.
- cron: '17 4 * * 1'
- cron: "17 4 * * 1"
repository_dispatch:
# Fired by a release workflow in another purview-dev repository. The
# expected payload contract is documented in the README.
Expand Down Expand Up @@ -49,10 +49,17 @@ jobs:
with:
tool: [email protected]

# The repository is a Bun workspace: the lockfile and root `package.json`
# live here, the Astro site package lives in `src/`, and every `bun run`
# / `just` recipe delegates to `src/` (see `package.json` scripts).
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run validation
# `just validate` runs a live data sync on fresh checkouts (no cache /
# docs mirror yet), so pass a token to avoid unauthenticated rate limits.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: just validate

- name: Refresh live release and documentation data
Expand Down Expand Up @@ -98,7 +105,8 @@ jobs:
# actions/upload-pages-artifact v5.0.0
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9
with:
path: ./dist
# Build output is written into the `src/` package (see package.json).
path: ./src/dist

deploy:
needs: build
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ jobs:
with:
tool: [email protected]

# The repository is a Bun workspace: the lockfile and root `package.json`
# live here, the Astro site package lives in `src/`, and every `bun run`
# / `just` recipe delegates to `src/` (see `package.json` scripts).
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run validation
# `just validate` runs a live data sync on fresh checkouts (no cache /
# docs mirror yet), so pass a token to avoid unauthenticated rate limits.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: just validate
Loading