diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
new file mode 100644
index 0000000000..1182ff1024
--- /dev/null
+++ b/.github/workflows/documentation.yml
@@ -0,0 +1,50 @@
+name: Documentation
+on:
+ pull_request:
+ release:
+ types: [created]
+
+jobs:
+ Documentation:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup MSBuild
+ uses: microsoft/setup-msbuild@v1.0.2
+ - name: Build SDK
+ run: |
+ dotnet build dropbox-sdk-dotnet/Dropbox.Api
+ - name: Build Documentation
+ run: |
+ dotnet restore doc/StoneDocs.shfbproj
+ msbuild doc/StoneDocs.shfbproj # WinForms refuse to work with .NET 5.0
+ tar -czf doc/Help.tar.gz -C doc/Help .
+ - name: Upload Documentation
+ uses: actions/upload-artifact@v2
+ with:
+ name: documentation.tar.gz
+ path: doc/Help.tar.gz
+ retention-days: 1
+ - name: Get Release Information
+ id: get_release
+ uses: bruceadams/get-release@v1.2.2
+ if: github.event_name == 'release'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ - name: Attach Documentation to Relase
+ uses: actions/upload-release-asset@v1.0.2
+ if: github.event_name == 'release'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ with:
+ upload_url: ${{ steps.get_release.outputs.upload_url }}
+ asset_path: doc/Help.tar.gz
+ asset_name: documentation.tar.gz
+ asset_content_type: application/gzip
+ - name: Push Documentation
+ uses: JamesIves/github-pages-deploy-action@releases/v3
+ if: github.event_name == 'release'
+ with:
+ ACCESS_TOKEN: ${{ secrets.GH_PAGES_PUBLISH_TOKEN }}
+ BRANCH: gh-pages # The branch the action should deploy to.
+ FOLDER: doc/Help # The folder the action should deploy.
diff --git a/doc/StoneDocs.shfbproj b/doc/StoneDocs.shfbproj
index 59b1cb364c..d27a4865e2 100644
--- a/doc/StoneDocs.shfbproj
+++ b/doc/StoneDocs.shfbproj
@@ -13,15 +13,15 @@
Documentation
StoneDocs
- .NET Framework 4.5
- .\Help\
+ Cross-platform (.NET Core/.NET Standard)
+ ./Help/
DotNetApiDocumentation
en-US
-
-
-
-
+
+
+
+
OnlyWarningsAndErrors
Website
False
@@ -55,10 +55,12 @@
- rmdir Help\toc /S /Q
-rmdir Help\fti /S /Q
-del Help\Search* /Q
-del Help\Web* /Q
+
+ rm -rf Help/toc
+ rm -rf Help/fti
+ rm -f Help/Search*
+ rm -f Help/Web*
+
OnBuildSuccess
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generate.py b/generate.py
deleted file mode 100755
index 6b075bfe33..0000000000
--- a/generate.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-from __future__ import absolute_import, division, print_function
-
-import glob
-import os
-import shutil
-import subprocess
-
-
-def main():
- """The entry point for the program."""
- stone_path = os.path.abspath('stone')
- print(stone_path)
- generator_path = os.path.abspath('generator')
- print(generator_path)
- spec_path = os.path.abspath('spec')
- print(spec_path)
- specs = glob.glob(spec_path + '/*.stone') # Arbitrary sorting
- specs.sort()
- print(specs)
-
- repo_path = os.path.abspath('dropbox-sdk-dotnet')
- print('Generating Stone types')
- try:
- shutil.rmtree(os.path.join(repo_path, 'Dropbox.Api', 'Generated'))
- except OSError:
- pass
- try:
- subprocess.check_output(
- (['python', '-m', 'stone.cli', '--filter-by-route-attr', 'alpah_group=null', '-a:all', generator_path + '/csharp.stoneg.py'] +
- [os.path.join(repo_path, 'Dropbox.Api')] + specs),
- cwd=stone_path)
- except subprocess.CalledProcessError as e:
- print(e.output)
-
-if __name__ == '__main__':
- main()