mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
Docs Overhaul (#8896)
* feat(docs): new docs scaffold * feat(docs): update alternate launchers section * feat(docs): add contributor section * fix(docs): update description of lynxhub launcher mention * feat(docs): add more docs * feat(docs): setup index page * feat(docs): add more docs, rewrote a few pages * feat(docs): add todo * feat(docs): set up internationalization * fix(docs): admonition typo * feat(docs): add invoke styles * feat(docs): add more invoke styling, revamp splash page, remove theme switcher * fix(docs): expressive code sh styles without title * chore(docs): cleanup readme * chore(docs): add new github pages workflow * fix(docs): remove base path * chore(docs): add initial translations CI, powered by Crowdin * feat(docs): upgrade astro * feat(docs): enhance new contributor guide * feat(docs): various enhancements - improve homepage; - enhance some docs pages; - override some layout components; - enhance interactivity and qol styling; - create new download page + component; - add llms.txt; - remove unused logo component; * feat(docs): isolate new docs * style(docs): use md reference links over utility links * chore(docs): specify package manager * feat(docs): releases page * feat(docs): add page context menus * feat(docs): sort workflows sidebar items * fix(docs): relative links on homepage * feat(docs): add text tool and recall params api guides * feat(docs): fix faq links, create models concept page * chore(docs): set CI to new dir, update deployment url * feat(docs): generate settings and api json for pages - update deploy script - add api and settings component to render generated json - increase page content width * style(docs): remove relative path for component import * fix(docs): resolve tests by regenerating json * fix(docs): fixing the test for real this time - sorts openapi output map required field - missing `__name__` attributes - resolved components name keyerror * feat(docs): finish 'adding nodes' page * feat(docs): upgrade astro + starlight, add link tester * chore(docs): upgrade astro * feat(docs): add prompting guides * fix(docs): generated openapi * fix(docs): ci node version * fix(docs): invalid links * fix(docs): md aside formatting * feat(docs): reorder 'configuration' category * feat(docs): change contributor checklist to steps list * chore(docs): upgrade deps * feat(docs): splash page image styling * feat(docs): add gallery marquee to homepage * feat(docs): add splash page marquee gallery * feat(docs): remove openapi generation * fix(docs): regenerate settings json * fix(docs): json generation test --------- Co-authored-by: joshistoast <me@joshcorbett.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
This commit is contained in:
89
.github/workflows/deploy-docs.yml
vendored
Normal file
89
.github/workflows/deploy-docs.yml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
name: 'docs'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
types:
|
||||
- 'ready_for_review'
|
||||
- 'opened'
|
||||
- 'synchronize'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: 'pages'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check-and-build:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Python (needed for generate-docs-data)
|
||||
- name: setup uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
version: '0.6.10'
|
||||
enable-cache: true
|
||||
python-version: '3.11'
|
||||
|
||||
- name: setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: install python dependencies
|
||||
run: uv pip install --editable .[test]
|
||||
|
||||
# Node (needed for docs build)
|
||||
- name: setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.12.0'
|
||||
|
||||
- name: setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
run_install: false
|
||||
|
||||
- name: install docs dependencies
|
||||
run: pnpm install --prefer-frozen-lockfile
|
||||
working-directory: docs-new
|
||||
|
||||
# Checks
|
||||
- name: verify generated docs data
|
||||
run: pnpm run check-docs-data
|
||||
working-directory: docs-new
|
||||
|
||||
- name: build docs
|
||||
run: pnpm build
|
||||
working-directory: docs-new
|
||||
|
||||
# Upload artifact for deploy (main branch only)
|
||||
- name: upload pages artifact
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs-new/dist
|
||||
|
||||
deploy:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs: check-and-build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
78
.github/workflows/translations.yml
vendored
Normal file
78
.github/workflows/translations.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
name: Crowdin Translations
|
||||
|
||||
on:
|
||||
# Allow manual runs from the Actions tab
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
upload_sources:
|
||||
description: 'Upload source strings to Crowdin'
|
||||
type: boolean
|
||||
default: true
|
||||
download_translations:
|
||||
description: 'Download translations from Crowdin'
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
# Upload sources & download translations when source files change on main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'invokeai/frontend/web/public/locales/en.json'
|
||||
- 'docs/src/content/i18n/en.json'
|
||||
- 'docs/src/content/docs/**/*.md'
|
||||
- 'docs/src/content/docs/**/*.mdx'
|
||||
- '!docs/src/content/docs/[a-z][a-z]/**'
|
||||
- '!docs/src/content/docs/[a-z][a-z]-*/**'
|
||||
- 'crowdin.yml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
crowdin-sync:
|
||||
name: Sync with Crowdin
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Crowdin Sync
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
# Upload sources on push to main or when manually requested
|
||||
upload_sources: ${{ github.event_name != 'workflow_dispatch' || inputs.upload_sources }}
|
||||
upload_translations: false
|
||||
|
||||
# Download translations on push to main or when manually requested
|
||||
download_translations: ${{ github.event_name != 'workflow_dispatch' || inputs.download_translations }}
|
||||
|
||||
# PR settings for downloaded translations
|
||||
create_pull_request: true
|
||||
pull_request_title: 'i18n: update translations from Crowdin'
|
||||
pull_request_body: |
|
||||
Automated pull request from [Crowdin](https://crowdin.com).
|
||||
|
||||
This PR updates translations for:
|
||||
- **Web App UI** (`invokeai/frontend/web/public/locales/`)
|
||||
- **Documentation UI Strings** (`docs/src/content/i18n/`)
|
||||
- **Documentation Content** (`docs/src/content/docs/<locale>/`)
|
||||
pull_request_base_branch_name: main
|
||||
pull_request_labels: 'i18n'
|
||||
|
||||
# Commit settings
|
||||
localization_branch_name: crowdin/translations
|
||||
commit_message: 'i18n: update translations from Crowdin'
|
||||
|
||||
# Use the config file at the repo root
|
||||
config: crowdin.yml
|
||||
|
||||
# Skip untranslated strings/files to keep partial translations clean
|
||||
download_translations_args: '--skip-untranslated-strings'
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
Reference in New Issue
Block a user