浏览代码

Merge pull request #148 from VaclavElias/update-6

Update 6 - Stride Docs improvements
Vaclav Elias 2 年之前
父节点
当前提交
00e2712705

+ 7 - 3
.github/workflows/stride-docs-release-azure.yml

@@ -18,21 +18,25 @@ on:
 
 jobs:
   build:
+    # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
     runs-on: windows-2022
 
     steps:
+    # Setup .NET SDK
     - name: Dotnet Setup
       uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 6.x
 
+    # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
       uses: actions/checkout@v3
       with:
         path: stride-docs
         lfs: true
 
+    # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
       uses: actions/checkout@v3
       with:
@@ -42,10 +46,10 @@ jobs:
         lfs: true
 
     - name: Install DocFX
-      # This installs the latest version of DocFX and may introduce breaking changes.
+      # This installs the latest version of DocFX and may introduce breaking changes
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.70.3
+      run: dotnet tool update -g docfx --version 2.70.4
 
     - name: Build documentation
       run: ./build-all.bat
@@ -87,4 +91,4 @@ jobs:
           app-name: 'stride-doc'
           slot-name: 'Production'
           publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4803638D673FA67D0C8650F34C4FA9D1 }}
-          package: ./stride-docs/_site
+          package: ./stride-docs/_site

+ 58 - 0
.github/workflows/stride-docs-release-fast-track-azure.yml

@@ -0,0 +1,58 @@
+# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
+# More GitHub Actions for Azure: https://github.com/Azure/actions
+
+# The Fast Track skips creating artifacts and compressing them
+name: Build Stride Docs (Fast Track) for Azure Web App Release 🚀
+
+on:
+  workflow_dispatch:
+
+jobs:
+  build-deploy:
+    # Run this job only if the repository is 'stride3d/stride-docs'
+    if: github.repository == 'stride3d/stride-docs'
+    runs-on: windows-2022
+    environment:
+      name: 'Production'
+
+    steps:
+    # Setup .NET SDK
+    - name: Dotnet Setup
+      uses: actions/setup-dotnet@v3
+      with:
+        dotnet-version: 6.x
+
+    # Checkout the Stride Docs repository from the branch that triggered the workflow
+    - name: Checkout Stride Docs
+      uses: actions/checkout@v3
+      with:
+        path: stride-docs
+        lfs: true
+
+    # Checkout the Stride repository from the default branch
+    - name: Checkout Stride (note the LFS)
+      uses: actions/checkout@v3
+      with:
+        repository: stride3d/stride
+        token: ${{ secrets.GITHUB_TOKEN }}
+        path: stride
+        lfs: true
+
+    - name: Install DocFX
+      # This installs the latest version of DocFX and may introduce breaking changes
+      # run: dotnet tool update -g docfx
+      # This installs a specific, tested version of DocFX.
+      run: dotnet tool update -g docfx --version 2.70.4
+
+    - name: Build documentation
+      run: ./build-all.bat
+      working-directory: stride-docs
+
+    - name: Deploy to Azure Web App
+      id: deploy-to-webapp
+      uses: azure/webapps-deploy@v2
+      with:
+          app-name: 'stride-doc'
+          slot-name: 'Production'
+          publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4803638D673FA67D0C8650F34C4FA9D1 }}
+          package: ./stride-docs/_site

+ 6 - 2
.github/workflows/stride-docs-staging-azure.yml

@@ -18,21 +18,25 @@ on:
 
 jobs:
   build:
+    # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
     runs-on: windows-2022
 
     steps:
+    # Setup .NET SDK
     - name: Dotnet Setup
       uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 6.x
 
+    # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
       uses: actions/checkout@v3
       with:
         path: stride-docs
         lfs: true
 
+    # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
       uses: actions/checkout@v3
       with:
@@ -45,7 +49,7 @@ jobs:
       # This installs the latest version of DocFX and may introduce breaking changes.
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.70.3
+      run: dotnet tool update -g docfx --version 2.70.4
 
     - name: Build documentation
       run: ./build-all.bat
@@ -87,4 +91,4 @@ jobs:
           app-name: 'stride-doc'
           slot-name: 'staging'
           publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_32FCD402B970463A9143B24C9B225749 }}
-          package: ./stride-docs/_site
+          package: ./stride-docs/_site

+ 8 - 13
.github/workflows/stride-docs-staging-fast-track-azure.yml

@@ -1,40 +1,35 @@
 # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
 # More GitHub Actions for Azure: https://github.com/Azure/actions
 
+# The Fast Track skips creating artifacts and compressing them
 name: Build Stride Docs (Fast Track) for Azure Web App Staging
 
 on:
-  # push:
-  #   branches:
-  #     - staging
-  #   paths-ignore:
-  #     - 'README.md'
-  #     - 'Stride.Docs.sln'
-  #     - 'BuildDocs.ps1'
-  #     - 'wiki/**'
-  #     - .gitignore
-  #     - '.github/**'
   workflow_dispatch:
 
 jobs:
   build-deploy:
+    # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
     runs-on: windows-2022
     environment:
       name: 'Production'
 
     steps:
+    # Setup .NET SDK
     - name: Dotnet Setup
       uses: actions/setup-dotnet@v3
       with:
         dotnet-version: 6.x
 
+    # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
       uses: actions/checkout@v3
       with:
         path: stride-docs
         lfs: true
 
+    # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
       uses: actions/checkout@v3
       with:
@@ -44,10 +39,10 @@ jobs:
         lfs: true
 
     - name: Install DocFX
-      # This installs the latest version of DocFX and may introduce breaking changes.
+      # This installs the latest version of DocFX and may introduce breaking changes
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.70.3
+      run: dotnet tool update -g docfx --version 2.70.4
 
     - name: Build documentation
       run: ./build-all.bat
@@ -60,4 +55,4 @@ jobs:
           app-name: 'stride-doc'
           slot-name: 'staging'
           publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_32FCD402B970463A9143B24C9B225749 }}
-          package: ./stride-docs/_site
+          package: ./stride-docs/_site

+ 1 - 0
.github/workflows/stride-docs-wiki.yml

@@ -9,6 +9,7 @@ on:
 
 jobs:
   build:
+    # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
     runs-on: ubuntu-latest
 

+ 2 - 0
Stride.Docs.sln

@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Docs", "Stride.Docs.
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{85103FBF-C9A6-4722-B36B-89A58F55C1DF}"
 	ProjectSection(SolutionItems) = preProject
+		.github\workflows\stride-docs-release-azure.yml = .github\workflows\stride-docs-release-azure.yml
+		.github\workflows\stride-docs-release-fast-track-azure.yml = .github\workflows\stride-docs-release-fast-track-azure.yml
 		.github\workflows\stride-docs-staging-azure.yml = .github\workflows\stride-docs-staging-azure.yml
 		.github\workflows\stride-docs-staging-fast-track-azure.yml = .github\workflows\stride-docs-staging-fast-track-azure.yml
 		.github\workflows\stride-docs-wiki.yml = .github\workflows\stride-docs-wiki.yml

+ 2 - 1
en/docfx.json

@@ -57,7 +57,8 @@
       "_appTitle": "Stride Docs",
       "_enableSearch": true,
       "_appLogoPath": "media/stride-logo-red.svg",
-      "_appFooter": "<div class=\"d-flex flex-column flex-sm-row justify-content-between pt-1 text-center small\"><p >Supported by the <a href=\"https://dotnetfoundation.org/\" target=\"_blank\" rel=\"noopener\">.NET Foundation</a></p><p>Made with <a href=\"https://dotnet.github.io/docfx\">docfx</a></p><p >Stride Docs Website v.2.0.0.5</p><p>&copy; .NET Foundation and Contributors</p></div>",
+      "_appLogoUrl": "https://www.stride3d.net/",
+      "_appFooter": "<div class=\"d-flex flex-column flex-sm-row justify-content-between pt-1 text-center small\"><p >Supported by the <a href=\"https://dotnetfoundation.org/\" target=\"_blank\" rel=\"noopener\">.NET Foundation</a></p><p>Made with <a href=\"https://dotnet.github.io/docfx\">docfx</a></p><p >Stride Docs Website v.2.0.0.6</p><p>&copy; .NET Foundation and Contributors</p></div>",
       "_gitContribute": {
         "repo": "https://github.com/stride3d/stride-docs",
         "branch": "master"

+ 1 - 1
en/index.md

@@ -1,6 +1,6 @@
 # Stride documentation
 
-Welcome to the Stride documentation, specifically designed for game developers, visual creators, and all users of the powerful Stride game engine. This resource is packed with detailed tutorials, in-depth manuals, and comprehensive API references to help you bring your game development visions to life with Stride. Whether you're new to Stride or looking to hone your skills, you'll find everything you need right here. Dive in, and let's create something extraordinary!
+Welcome to the Stride documentation, specifically designed for game developers, visual creators, and all users of the powerful [Stride game engine](https://www.stride3d.net/). This resource is packed with detailed tutorials, in-depth manuals, and comprehensive API references to help you bring your game development visions to life with Stride. Whether you're new to Stride or looking to hone your skills, you'll find everything you need right here. Dive in, and let's create something extraordinary!
 
 > [!TIP]
 > This documentation is primarily for users of the Stride engine. If you are interested in contributing to the Stride engine code base, please follow the [Stride contribution instructions](https://github.com/stride3d/stride).

+ 4 - 0
en/template/public/main.css

@@ -13,6 +13,10 @@
     height: 37px;
 }
 
+#navbar ul.navbar-nav {
+    margin-top: -3px;
+}
+
 .filter input, .search input {
     padding-top: 0.25rem;
     padding-bottom: 0.25rem;

+ 2 - 0
en/toc.yml

@@ -1,3 +1,5 @@
+- name: 📖 Stride Docs
+  href: index.md
 - name: 📚 Manual
   href: manual/
   homepage: manual/index.md