Przeglądaj źródła

feat: common-setup.yml added

Vaclav Elias 1 rok temu
rodzic
commit
446b97bde9
2 zmienionych plików z 43 dodań i 0 usunięć
  1. 42 0
      .github/workflows/common-setup.yml
  2. 1 0
      Stride.Docs.sln

+ 42 - 0
.github/workflows/common-setup.yml

@@ -0,0 +1,42 @@
+name: Common Setup for Stride Documentation
+
+on:
+  workflow_call:
+
+jobs:
+  setup:
+    runs-on: windows-2022
+
+    outputs:
+      dotnet-version: '8.x'
+      stride-docs-path: 'stride-docs'
+      stride-path: 'stride'
+
+    steps:
+    # Setup .NET SDK
+    - name: Dotnet Setup
+      uses: actions/setup-dotnet@v4
+      with:
+        dotnet-version: 8.x
+
+    # Checkout the Stride Docs repository from the branch that triggered the workflow
+    - name: Checkout Stride Docs
+      uses: actions/checkout@v4
+      with:
+        path: stride-docs
+        lfs: true
+
+    # Checkout the Stride repository from the default branch
+    - name: Checkout Stride (note the LFS)
+      uses: actions/checkout@v4
+      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.76.0

+ 1 - 0
Stride.Docs.sln

@@ -7,6 +7,7 @@ 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\common-setup.yml = .github\workflows\common-setup.yml
 		.github\workflows\stride-docs-github.yml = .github\workflows\stride-docs-github.yml
 		.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