瀏覽代碼

Migrating api docs for v1

Tig 1 月之前
父節點
當前提交
3a185cef39
共有 5 個文件被更改,包括 17 次插入14 次删除
  1. 9 8
      .github/workflows/api-docs.yml
  2. 3 2
      docfx/docs/index.md
  3. 1 1
      docfx/docs/toc.yml
  4. 2 1
      docfx/index.md
  5. 2 2
      docfx/toc.yml

+ 9 - 8
.github/workflows/api-docs.yml

@@ -1,9 +1,8 @@
-name: Build and publish API docs
+name: Build and publish v1 API docs
 
 on:
   push:
-  # only publish v2 (main or develop); v2 is published via the Terminal.GuiV2Docs repo
-    branches: [v1_release, v1_develop]
+    branches: [v1_release]
     paths: 
       - docfx/**
 
@@ -12,7 +11,6 @@ permissions:
   pages: write
 
 jobs:
-  # Single deploy job since we're just deploying
   deploy:
     name: Build and Deploy API docs to github-pages
     environment:
@@ -40,8 +38,11 @@ jobs:
       with:
         path: docfx/_site
        
-    - name: Deploy to GitHub Pages
-      id: deployment
-      uses: actions/deploy-pages@v3
+    - name: v1_release Repository Dispatch ${{ github.ref_name }}
+      if: github.ref_name == 'v1_release'
+      uses: peter-evans/repository-dispatch@v3
       with:
-        token: ${{ secrets.GITHUB_TOKEN }}
+        token: ${{ secrets.V2DOCS_TOKEN }}
+        repository: gui-cs/Terminal.GuiV1Docs
+        event-type: v2_develop_push
+        client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

+ 3 - 2
docfx/docs/index.md

@@ -1,6 +1,7 @@
-# Conceptual Documentation
+# Conceptual Documentation for Terminal.Gui v1
 
-**These are the v1 API docs**. The v2 API docs are [here](https://gui-cs.github.io/Terminal.GuiV2Docs/).
+> [!NOTE]
+> This is the v1 API documentation. For v2 go here: https://gui-cs.github.io/Terminal.Gui
 
 * [Terminal.Gui Overview](overview.md)
 * [List of Views](views.md)

+ 1 - 1
docfx/docs/toc.yml

@@ -1,4 +1,4 @@
-- name: API Reference
+- name: v1 API Reference
   href: api/Terminal.Gui/
 - name: Terminal.Gui Overview
   href: overview.md

+ 2 - 1
docfx/index.md

@@ -1,6 +1,7 @@
 # Terminal.Gui v1 - Cross Platform Terminal UI toolkit for .NET
 
-**These are the v1 API docs**. The v2 API docs are [here](https://gui-cs.github.io/Terminal.GuiV2Docs/).
+> [!NOTE]
+> This is the v1 API documentation. For v2 go here: https://gui-cs.github.io/Terminal.Gui
 
 A toolkit for building rich console apps for .NET, .NET Core, and Mono that works on Windows, the Mac, and Linux/Unix.
 

+ 2 - 2
docfx/toc.yml

@@ -2,9 +2,9 @@
   href: docs/overview.md
 - name: Conceptual Docs
   href: docs/index.md
-- name: API Reference
+- name: v1 API Reference
   href: api/Terminal.Gui
 # - name: UI Catalog API
 #   href: api/UICatalog/
 - name: Source
-  href: https://github.com/gui-cs/Terminal.Gui
+  href: https://github.com/gui-cs/Terminal.Gui/tree/v1_release