Skip to content

Commit 327c38e

Browse files
authored
CI (#1)
* Load font, favicon, build workflow * Collapse build and deploy * Biome and dependabot * Format code
1 parent 95ef60c commit 327c38e

File tree

16 files changed

+321
-54
lines changed

16 files changed

+321
-54
lines changed

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: 'npm'
9+
directory: '/' # Location of package manifests
10+
schedule:
11+
interval: 'weekly'
12+
groups:
13+
npm:
14+
patterns:
15+
- '*'
16+
- package-ecosystem: 'github-actions'
17+
directory: '.github/workflows'
18+
schedule:
19+
interval: 'weekly'
20+
groups:
21+
github:
22+
patterns:
23+
- '*'

.github/workflows/code-quality.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Code Quality
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
code-quality:
11+
name: Code Quality
12+
if: github.actor != 'dependabot[bot]'
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: 🛎 Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.head_ref }}
22+
token: ${{ secrets.WORKFLOW_COMMIT }}
23+
24+
- name: 🟨 Setup PNPM
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: latest
28+
29+
- name: 🟩 Setup Node.js and caching
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: latest
33+
cache: 'pnpm'
34+
35+
- name: 🔧 Install Dependencies
36+
run: pnpm install
37+
38+
- name: 📝 Check Code
39+
run: pnpm check
40+
41+
- name: ✅ Commit code format changes
42+
uses: stefanzweifel/git-auto-commit-action@v5
43+
with:
44+
commit_message: "Format code"
45+
skip_fetch: true
46+
skip_checkout: true
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Website
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: 'pages'
15+
cancel-in-progress: true
16+
17+
jobs:
18+
deploy-website:
19+
name: Deploy Website
20+
21+
runs-on: ubuntu-latest
22+
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
27+
steps:
28+
- name: 🛎 Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ github.head_ref }}
32+
33+
- name: 🟨 Setup PNPM
34+
uses: pnpm/action-setup@v4
35+
with:
36+
version: latest
37+
38+
- name: 🟩 Setup Node.js and caching
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: latest
42+
cache: 'pnpm'
43+
44+
# Install dependencies
45+
- name: 📦 Install
46+
run: pnpm install
47+
48+
- name: 🔨 Build
49+
run: pnpm build
50+
51+
# Upload artifact if requested
52+
- name: ⬆️ Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: 'dist'
56+
57+
- name: 🚀 Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.vscode/extensions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode"],
3-
"unwantedRecommendations": []
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
44
}

.vscode/launch.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
"command": "./node_modules/.bin/astro dev",
6-
"name": "Development server",
7-
"request": "launch",
8-
"type": "node-terminal"
9-
}
10-
]
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
1111
}

astro.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// @ts-check
2-
import { defineConfig } from 'astro/config';
2+
import { defineConfig } from "astro/config";
33

44
// https://astro.build/config
5-
export default defineConfig({});
5+
export default defineConfig({
6+
site: "https://virtualbrainlab.github.io",
7+
});

biome.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "tab"
15+
},
16+
"organizeImports": {
17+
"enabled": true
18+
},
19+
"linter": {
20+
"enabled": true,
21+
"rules": {
22+
"recommended": true
23+
}
24+
},
25+
"javascript": {
26+
"formatter": {
27+
"quoteStyle": "double"
28+
}
29+
}
30+
}

package.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{
2-
"name": "pinpoint-site",
3-
"type": "module",
4-
"version": "0.0.1",
5-
"scripts": {
6-
"dev": "astro dev",
7-
"build": "astro build",
8-
"preview": "astro preview",
9-
"astro": "astro"
10-
},
11-
"dependencies": {
12-
"astro": "^5.1.7"
13-
}
14-
}
2+
"name": "pinpoint-site",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"build": "astro build",
8+
"preview": "astro preview",
9+
"astro": "astro",
10+
"format": "biome format --write .",
11+
"lint": "biome lint --write .",
12+
"check": "biome check --write ."
13+
},
14+
"dependencies": {
15+
"astro": "^5.1.7"
16+
},
17+
"devDependencies": {
18+
"@biomejs/biome": "1.9.4"
19+
}
20+
}

pnpm-lock.yaml

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/favicon.ico

66.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)