Skip to content

chore: move docs website to main repo #801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 30 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy Docs and Trigger Main Website Build
on:
push:
branches:
- main
paths:
- "docs/**"

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: yarn install
- name: Apply all pending migrations to the database
run: npx prisma migrate deploy
env:
POSTGRES_PRISMA_URL: ${{ secrets.POSTGRES_PRISMA_URL }}
POSTGRES_URL_NON_POOLING: ${{ secrets.POSTGRES_URL_NON_POOLING }}
# Trigger the deployment of the main website for guide updates
- name: Trigger main website build
run: |
curl -X POST ${{ secrets.MAIN_WEBSITE_DEPLOY_URL }}
123 changes: 123 additions & 0 deletions .github/workflows/test-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Test Docs

on:
pull_request:
paths:
- "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
env:
NODE_OPTIONS: --max-old-space-size=4096
NEXT_PUBLIC_VERCEL_URL: nitric.io
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: cypress-io/github-action@v6
with:
runTests: false
install-command: yarn --frozen-lockfile
working-directory: docs
- name: Run format linting
run: yarn format:check
- name: Run spellcheck test
run: yarn test:spellcheck

test-broken-links:
runs-on: ubuntu-latest
needs: [tests]
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress tests 🧪
uses: cypress-io/github-action@v6
with:
headless: true
config: video=false
browser: chrome
spec: cypress/e2e/broken-links.cy.ts
build: yarn cypress:build
start: yarn start
wait-on: "http://localhost:3000"
working-directory: docs
env:
NEXT_PUBLIC_GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-broken-links
path: docs/cypress/screenshots

test-a11y:
runs-on: ubuntu-latest
needs: [tests]
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress tests 🧪
uses: cypress-io/github-action@v6
with:
headless: true
config: video=false
browser: chrome
spec: cypress/e2e/a11y.cy.ts
build: yarn cypress:build
start: yarn start
wait-on: "http://localhost:3000"
working-directory: docs
env:
NEXT_PUBLIC_GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-a11y
path: docs/cypress/screenshots

test-seo:
runs-on: ubuntu-latest
needs: [tests]
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress tests 🧪
uses: cypress-io/github-action@v6
with:
headless: true
config: video=false
browser: chrome
spec: cypress/e2e/seo.cy.ts
build: yarn cypress:build
start: yarn start
wait-on: "http://localhost:3000"
working-directory: docs
env:
NEXT_PUBLIC_GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-seo
path: docs/cypress/screenshots
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
branches:
- main
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions docs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
39 changes: 39 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.contentlayer

old
1 change: 1 addition & 0 deletions docs/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn lint-staged
22 changes: 22 additions & 0 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ignore build artifacts
dist/
build/
out/

# Exclude third-party code
node_modules/
vendor/

# Exclude configuration files
.eslintrc
.eslintignore

# Skip binary files
*.png
*.jpg
*.gif

# Exclude version control directories
.git/
.svn/
.hg/
19 changes: 19 additions & 0 deletions docs/.puppeteerrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const isCI = !!process.env.VERCEL_ENV

if (!isCI) {
// just use the default configuration on non vercel CI environments
return {}
}

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
cacheDirectory: '/vercel/.cache/puppeteer',
executablePath:
'/vercel/.cache/puppeteer/chrome/linux-131.0.6778.204/chrome-linux64/chrome',
chrome: {
skipDownload: true,
},
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
}
15 changes: 15 additions & 0 deletions docs/.spellcheckerrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
files:
- 'docs/**/*.{md,mdx}'
dictionaries:
- dictionary.txt
quiet: true
language: en-US
frontmatter-keys:
- description
- title_seo
plugins:
- spell
- syntax-urls
- syntax-mentions
- repeated-words
- frontmatter
11 changes: 11 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<p align="center"><a href="https://nitric.io" target="_blank"><img src="https://raw.githubusercontent.com/nitrictech/nitric/main/docs/assets/nitric-logo.svg" height="120"></a></p>

## Nitric documentation

Documentation for the [Nitric framework](https://github.com/nitrictech/nitric).

Updates to the documentation will be included in the Nitric doc website located [here](https://nitric.io/docs).

## Generated CLI Command Docs

Output for the CLI commands are automatically generated into `/src/assets` via the [collect-assets.js script](./scripts/collect-assets.js) and can be referenced in the mdx pages as seen [here](./docs/reference/cli.mdx).
17 changes: 17 additions & 0 deletions docs/chrome-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mesa-libgbm
nss
nspr
at-spi2-atk
cups-libs
libdrm
libXcomposite
libXdamage
libXext
libXrandr
libgbm
libxcb
alsa-lib
atk
gtk3
pango
libxkbcommon
20 changes: 20 additions & 0 deletions docs/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/styles/tailwind.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
Loading
Loading