Browse Source

feat: GitHub Action added for deployment to GitHub Pages

Vaclav Elias 2 years ago
parent
commit
d404b6ba96
2 changed files with 45 additions and 0 deletions
  1. 44 0
      .github/workflows/stride-docs-github.yml
  2. 1 0
      Stride.Docs.sln

+ 44 - 0
.github/workflows/stride-docs-github.yml

@@ -0,0 +1,44 @@
+# More GitHub Actions for Azure: https://github.com/Azure/actions
+
+name: Build Stride Docs for GitHub Staging
+
+on:
+  workflow_dispatch:
+
+jobs:
+  publish-docs:
+    runs-on: windows-2022
+
+    steps:
+      - name: Dotnet Setup
+        uses: actions/setup-dotnet@v3
+        with:
+          dotnet-version: 8.x
+
+      - name: Checkout Stride Docs
+        uses: actions/checkout@v3
+        with:
+          path: stride-docs
+          lfs: true
+
+      - 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
+        run: dotnet tool update -g docfx --version 2.74.0
+
+      - name: Build documentation
+        run: ./build-all.bat
+        working-directory: stride-docs
+
+      - name: Deploy
+        uses: peaceiris/[email protected]
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: stride-docs/_site
+          publish_branch: gh-pages

+ 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\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
 		.github\workflows\stride-docs-staging-azure.yml = .github\workflows\stride-docs-staging-azure.yml