mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-24 07:42:05 +08:00
ci: add documentation sync and publishing workflows to discourse (#1387)
* ci: add documentation sync and publishing workflows - Added `sync_docs.rb` to automate syncing and processing documentation. - Integrated GitHub Actions workflows to validate and publish docs. - Supports dynamic title generation via Gemini API and proper formatting conversions. * ci: add documentation sync and publishing workflows - Added `sync_docs.rb` to automate syncing and processing documentation. - Integrated GitHub Actions workflows to validate and publish docs. - Supports dynamic title generation via Gemini API and proper formatting conversions. * no need and fix * maybe * i think it wants this * i think it wants this * i think it wants this * send it * Fix the link * Improve CI documentation processing logic and link handling - Updated MkDocs conversions for "tabs" and callout styles for better Obsidian compatibility. - Enhanced internal markdown link rewriting to resolve Discourse topic links. - Reduced rate limit for Gemini API requests, improving call stability. - Fixed GitHub link in generated documents to include specific document paths.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Publish Docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish:
|
||||
description: 'Set to true to publish to forum'
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
DOCS_CATEGORY_ID: 114
|
||||
DOCS_DATA_EXPLORER_QUERY_ID: 2
|
||||
DOCS_TARGET: https://forum.sunnypilot.ai
|
||||
DOCS_API_KEY: ${{ secrets.DISCOURSE_API_KEY }}
|
||||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
||||
|
||||
jobs:
|
||||
# dry_run:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - uses: ruby/setup-ruby@v1
|
||||
# with:
|
||||
# ruby-version: "3.3"
|
||||
# bundler-cache: true
|
||||
# working-directory: ./release/ci
|
||||
# - run: bundle exec ./sync_docs.rb --dry-run
|
||||
# working-directory: ./release/ci
|
||||
|
||||
publish:
|
||||
# if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
|
||||
# needs: dry_run
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "3.3"
|
||||
bundler-cache: true
|
||||
working-directory: ./release/ci
|
||||
- run: bundle exec ./sync_docs.rb
|
||||
working-directory: ./release/ci
|
||||
Reference in New Issue
Block a user