Skip to content

Commit

Permalink
feat: add documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
pepicrft committed Aug 13, 2024
1 parent 305a099 commit c1172db
Show file tree
Hide file tree
Showing 17 changed files with 2,506 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy
on:
push:
branches:
- "main"

concurrency:
group: deploy-${{ github.head_ref }}
cancel-in-progress: true

env:
MISE_EXPERIMENTAL: 1

jobs:
docs:
name: Docs
runs-on: ubuntu-latest
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: jdx/mise-action@v2
with:
experimental: true
- run: mise run install
- run: mise run docs:deploy
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docs

on:
push:
branches:
- main
pull_request:

concurrency:
group: docs-${{ github.head_ref }}
cancel-in-progress: true

env:
MISE_EXPERIMENTAL: 1

jobs:
build:
name: Build
runs-on: 'ubuntu-latest'
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Install dependencies
run: mise run install
- name: Build
run: mise run docs:build
lint:
name: Lint
runs-on: 'ubuntu-latest'
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Restore Cache
uses: actions/cache@v3
id: mix-cache
with:
path: |
deps
_build
_site
key: mix-${{ hashFiles('mix.lock') }}
- name: Install dependencies
run: mise run install
- name: Run Credo
run: mise run lint
149 changes: 148 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,151 @@ graph.dot
Derived/

### Tuist managed dependencies ###
Tuist/.build
Tuist/.build

# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

# End of https://www.toptal.com/developers/gitignore/api/node

docs/.vitepress/cache
4 changes: 3 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[tools]
tuist = "4.23.0"
"git-cliff" = "2.4.0"
"git-cliff" = "2.4.0"
"pnpm" = "9.7"
"nodejs" = "22.6.0"
4 changes: 4 additions & 0 deletions .mise/tasks/docs/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

pnpm run -C $MISE_PROJECT_ROOT/docs build
4 changes: 4 additions & 0 deletions .mise/tasks/docs/deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

pnpm run -C $MISE_PROJECT_ROOT/docs deploy
4 changes: 4 additions & 0 deletions .mise/tasks/docs/dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

pnpm run -C $MISE_PROJECT_ROOT/docs dev
4 changes: 4 additions & 0 deletions .mise/tasks/docs/preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

pnpm run -C $MISE_PROJECT_ROOT/docs preview
61 changes: 61 additions & 0 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { defineConfig } from 'vitepress'
import {
cubeOutlineIcon,
cube02Icon,
cube01Icon,
barChartSquare02Icon,
code02Icon,
dataIcon,
checkCircleIcon,
tuistIcon,
cloudBlank02Icon,
server04Icon,
} from "./icons.mjs";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Apple Bundle Analyzer",
titleTemplate: ':title | Apple Bundle Analyzer | Tuist',
description: "Analyze Apple-generated bundles",
themeConfig: {
logo: "/logo.png",
search: {
provider: "local",
},
nav: [
{ text: "Changelog", link: "https://github.com/tuist/AppleBundleAnalyzer/releases" }
],
editLink: {
pattern: "https://github.com/tuist/AppleBundleAnalyzer/edit/main/docs/:path",
},
sidebar: [
{
text: `<span style="display: flex; flex-direction: row; align-items: center; gap: 7px;">Quick start ${tuistIcon()}</span>`,
items: [
{ text: 'Why Apple Bundle Analyzer?', link: '/' },
{ text: 'Add dependency', link: '/quick-start/add-dependency' },
]
},
{
text: `<span style="display: flex; flex-direction: row; align-items: center; gap: 7px;">API ${cube01Icon()}</span>`,
items: [
{ text: 'Schema', link: '/api/schema' },
]
}
],

socialLinks: [
{ icon: "github", link: "https://github.com/tuist/tuist" },
{ icon: "x", link: "https://x.com/tuistio" },
{ icon: "mastodon", link: "https://fosstodon.org/@tuist" },
{
icon: "slack",
link: "https://slack.tuist.io",
},
],
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2024-present Tuist Inc.",
},
}
})
Loading

0 comments on commit c1172db

Please sign in to comment.