diff --git a/.dockerignore b/.dockerignore index c578d30be3ca..087716df1f38 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,8 +4,7 @@ .vscode/ contributing/ docs/ -node_modules/ -tests/ -# Folder is cloned during the Dockerfile build docs-early-access/ +node_modules/ README.md +tests/ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 146c40f1f5a0..da85f250f814 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,10 +4,10 @@ # https://git-scm.com/docs/gitignore # Site Policy -/content/site-policy/ @github/site-policy-admins +content/site-policy/ @github/site-policy-admins # Enterprise -/data/release-notes/**/*.yml @github/docs-content-enterprise +data/release-notes/**/*.yml @github/docs-content-enterprise src/ghes-releases/lib/enterprise-dates.json @github/docs-content-enterprise # Requires review of #actions-oidc-integration, docs-engineering/issues/1506 diff --git a/.gitignore b/.gitignore index 72a376a8d960..5ad99e78e7a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,58 +1,113 @@ -.search-cache +# Test coverage reports +.coverage/ + +# macOS system files .DS_Store + +# Environment variables (contains secrets) .env -.vscode/settings.json -.idea/ -/node_modules/ -npm-debug.log -coverage/ -/assets/images/early-access -/content/early-access -/data/early-access -/src/dev-toc/static -.next + +# ESLint cache for faster linting .eslintcache -*.tsbuildinfo -/translations/ + +# JetBrains IDE files +.idea/ + +# Tracks package-lock.json installation state +.installed.package-lock.json + +# Linkinator full site link check results +.linkinator/ + +# Next.js build output +.next/ + +# Node.js version specification .node-version -.linkinator/full.log -next-env.d.ts -nohup.out -# blc: broken link checker +# Precomputed page info cache (brotli compressed) +.pageinfo-cache.json.br + +# getRemoteJSON() disk cache for archived content +.remotejson-cache/ + +# VS Code workspace settings +.vscode/settings.json + +# TypeScript incremental build info +*.tsbuildinfo + +# Early access images from docs-early-access repo +assets/images/early-access/ + +# Accidentally committed file that should be ignored +assets/images/help/writing/unordered-list-rendered (1).png + +# Old broken link checker output blc_output.log + +# Old internal broken link checker output blc_output_internal.log + +# Old broken links report broken_links.md -# This one is purely for historical reasons because so many people might -# still have these files on their disk. -lib/redirects/.redirects-cache*.json +# Early access content from docs-early-access repo +content/early-access/ + +# Test coverage reports +coverage/ + +# Early access data from docs-early-access repo +data/early-access/ -# Logs from scripts -*/logs/ +# Cloned for Elasticsearch indexing data +docs-internal-data/ + +# External link checker cache database external-link-checker-db.json -# Playwright related -/test-results/ -/playwright-report/ -/playwright/.cache/ +# Historical redirects cache (legacy) +lib/redirects/.redirects-cache*.json -# Automated content source -rest-api-description -semmle-code -models-gateway +# Script execution logs +logs/ -.installed.package-lock.json -assets/images/help/writing/unordered-list-rendered (1).png +# GitHub Models API descriptions +models-gateway/ -# Used by getRemoteJSON() -.remotejson-cache/ +# Next.js TypeScript environment definitions +next-env.d.ts -# Used by precompute-pageinfo -.pageinfo-cache.json.br +# Node.js dependencies +node_modules/ -# Cloned and used for indexing Elasticsearch data -docs-internal-data/ +# Background process output +nohup.out + +# NPM debug logs +npm-debug.log + +# Playwright test reports +playwright-report/ -# For intermediate data (like scraping for Elasticsearch indexing) +# Playwright browser cache +playwright/.cache/ + +# REST API OpenAPI descriptions +rest-api-description/ + +# CodeQL CLI documentation source +semmle-code/ + +# Development table of contents static HTML files +src/dev-toc/static/ + +# Playwright test result artifacts +test-results/ + +# Temporary data files tmp/ + +# Localized content from translation repositories +translations/ diff --git a/.prettierignore b/.prettierignore index 4a5ab8409d53..5c6d47147fa4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,10 +1,2 @@ data/release-notes/ src/bookmarklets/ -/.next/ - -/.coverage -/coverage - -# Automated content source -rest-api-description -semmle-code diff --git a/Dockerfile b/Dockerfile index 5a8c618aae2e..780e7c5ccc58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,9 +53,9 @@ RUN --mount=type=secret,id=DOCS_BOT_PAT_BASE,mode=0444 \ echo "Don't cache this step by printing date: $(date)" && \ . ./build-scripts/fetch-repos.sh -# ----------------------------------------- +# ------------------------------------------------ # PROD_DEPS STAGE: Install production dependencies -# ----------------------------------------- +# ------------------------------------------------ FROM base AS prod_deps USER node:node WORKDIR $APP_HOME @@ -66,17 +66,17 @@ COPY --chown=node:node package.json package-lock.json ./ # Install only production dependencies (skip scripts to avoid husky) RUN npm ci --omit=dev --ignore-scripts --registry https://registry.npmjs.org/ -# ----------------------------------------- +# ------------------------------------------------------------ # ALL_DEPS STAGE: Install all dependencies on top of prod deps -# ----------------------------------------- +# ------------------------------------------------------------ FROM prod_deps AS all_deps # Install dev dependencies on top of production ones RUN npm ci --registry https://registry.npmjs.org/ -# ----------------------------------------- +# ---------------------------------- # BUILD STAGE: Build the application -# ----------------------------------------- +# ---------------------------------- FROM base AS build USER node:node WORKDIR $APP_HOME @@ -99,17 +99,17 @@ COPY --chown=node:node --from=all_deps $APP_HOME/node_modules node_modules/ # Build the application RUN npm run build -# ----------------------------------------- +# --------------------------------------------- # WARMUP_CACHE STAGE: Warm up remote JSON cache -# ----------------------------------------- +# --------------------------------------------- FROM build AS warmup_cache # Generate remote JSON cache RUN npm run warmup-remotejson -# ----------------------------------------- +# -------------------------------------- # PRECOMPUTE STAGE: Precompute page info -# ----------------------------------------- +# -------------------------------------- FROM build AS precompute_stage # Generate precomputed page info