Skip to content

Commit

Permalink
docs: setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hverlin committed Dec 10, 2024
1 parent 9f57b91 commit a1fe584
Show file tree
Hide file tree
Showing 24 changed files with 10,196 additions and 494 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: docs

on:
push:
branches: [main]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: corepack enable && pnpm i --frozen-lockfile
- name: Build with Rspress
run: |
cd docs
pnpm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
node_modules
mise.local.toml
dist/
.DS_Store
.DS_Store
doc/.astro
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
**/*.ts
docs/**
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"files": {
"ignoreUnknown": false,
"ignore": ["node_modules", "dist", ".vscode", "package.json"]
"ignore": [".astro", "node_modules", "dist", ".vscode", "package.json"]
},
"formatter": {
"enabled": true,
Expand Down
21 changes: 21 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: "VSCode mise",
social: {
github: "https://github.com/hverlin/mise-vscode",
},
}),
],
});
17 changes: 17 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.29.2",
"astro": "^4.16.10",
"sharp": "^0.32.5"
}
}
Loading

0 comments on commit a1fe584

Please sign in to comment.