feat(website): add website placeholder and ci
Some checks failed
Build and Push Docker Image / build (push) Failing after 6s

This commit is contained in:
Lars Hampe 2024-09-28 14:28:51 +02:00
parent 995642768b
commit fa71d542b9
18 changed files with 165 additions and 2 deletions

View File

@ -33,4 +33,7 @@ jobs:
with:
registry: git.hashdot.co
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Website
uses: bun docker:website

View File

21
apps/website/.gitignore vendored Normal file
View File

@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

4
apps/website/.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}

11
apps/website/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}

1
apps/website/README.md Normal file
View File

@ -0,0 +1 @@
# boring.tools - Website

View File

@ -0,0 +1,27 @@
import starlight from '@astrojs/starlight'
// @ts-check
import { defineConfig } from 'astro/config'
// https://astro.build/config
export default defineConfig({
outDir: '../../build/website',
integrations: [
starlight({
title: 'boring.tools',
social: {
github: 'https://github.com/boring-tools/boring.tools',
},
favicon: '/public/favicon.svg',
sidebar: [
{
label: 'Guides',
items: [{ label: 'Getting started', slug: 'guides/getting-started' }],
},
// {
// label: 'Reference',
// autogenerate: { directory: 'reference' },
// },
],
}),
],
})

19
apps/website/package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "website",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.28.2",
"astro": "^4.15.3",
"sharp": "^0.32.5",
"@astrojs/check": "^0.9.3",
"typescript": "^5.6.2"
}
}

View File

@ -0,0 +1,3 @@
<svg width="99" height="73" viewBox="0 0 99 73" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M37.792 51.552C37.792 58.08 36.16 63.296 32.896 67.2C29.632 71.04 24.864 72.96 18.592 72.96C12.64 72.96 6.72 71.392 0.832001 68.256V0.959999H6.592V31.68C9.408 29.056 12.096 27.168 14.656 26.016C17.28 24.864 19.936 24.288 22.624 24.288C27.552 24.288 31.296 26.176 33.856 29.952C36.48 33.664 37.792 38.944 37.792 45.792V51.552ZM21.472 29.76C19.424 29.76 17.28 30.272 15.04 31.296C12.864 32.256 10.048 34.336 6.592 37.536V64.992C10.56 66.784 14.464 67.68 18.304 67.68C23.104 67.68 26.528 66.24 28.576 63.36C30.688 60.48 31.744 56.544 31.744 51.552V45.792C31.744 40.288 30.912 36.256 29.248 33.696C27.584 31.072 24.992 29.76 21.472 29.76ZM56.6898 72H49.7778V64.992H56.6898V72ZM98.7078 70.368C97.0438 71.136 95.1238 71.744 92.9478 72.192C90.7718 72.704 88.5638 72.96 86.3238 72.96C82.6118 72.96 79.6358 72.192 77.3958 70.656C75.1558 69.12 73.5238 66.976 72.4998 64.224C71.5398 61.472 71.0598 58.336 71.0598 54.816V32.928H63.1878V23.328H71.0598V10.656H82.0998V23.328H97.2678V32.928H82.0998V54.816C82.0998 57.76 82.6438 59.808 83.7318 60.96C84.8838 62.048 86.5158 62.592 88.6278 62.592C89.6518 62.592 90.7398 62.496 91.8918 62.304C93.1078 62.048 94.4518 61.632 95.9238 61.056L98.7078 70.368Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,6 @@
import { defineCollection } from 'astro:content'
import { docsSchema } from '@astrojs/starlight/schema'
export const collections = {
docs: defineCollection({ schema: docsSchema() }),
}

View File

@ -0,0 +1,9 @@
---
title: Getting started
description: A guide to start with boring tools
---
Thanks for stopping by. Unfortunately there's not much going on here at the moment. But the first tool is already in the starting blocks and will be here soon. There will also be more information about the whole project here.
So check back soon.

View File

@ -0,0 +1,13 @@
---
title: boring.tools
description: Your tools for the boring stuff
template: splash
hero:
tagline: Your tools for the boring stuff
# image:
# file: ../../assets/boring.tools.svg
actions:
- text: Getting started
link: /guides/getting-started/
icon: right-arrow
---

2
apps/website/src/env.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

View File

@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}

View File

@ -0,0 +1,4 @@
FROM nginx:alpine AS runtime
COPY ./ci/docker/website/nginx.conf /etc/nginx/nginx.conf
COPY ./build/website /usr/share/nginx/html
EXPOSE 80

View File

@ -0,0 +1,31 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
internal;
}
location / {
try_files $uri $uri/index.html =404;
}
}
}

View File

@ -6,7 +6,10 @@
"check:apps": "bunx biome check --write --config-path ./biome.json ./apps",
"check:packages": "bunx biome check --write --config-path ./biome.json ./packages",
"dev": "bun --filter '*' dev",
"build": "bun --filter '*' build"
"build": "bun --filter '*' build",
"docker:website:build": "docker build -t git.hashdot.co/boring.tools/boring.tools/website -f ci/docker/website/Dockerfile .",
"docker:website:push": "docker push git.hashdot.co/boring.tools/boring.tools/website",
"docker:website": "bun docker:website:build && bun docker:website:push"
},
"packageManager": "bun@1.1.29",
"workspaces": [