1
+ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2
+ # More GitHub Actions for Azure: https://github.com/Azure/actions
3
+
4
+ name : Build Stride Docs for Azure Web App Staging
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - staging
10
+ paths-ignore :
11
+ - ' README.md'
12
+ - ' BuildDocs.ps1'
13
+ - ' wiki/**'
14
+ - .gitignore
15
+ - ' .github/**'
16
+ workflow_dispatch :
17
+
18
+ jobs :
19
+ build :
20
+ runs-on : windows-2022
21
+
22
+ steps :
23
+ - name : Dotnet Setup
24
+ uses : actions/setup-dotnet@v3
25
+ with :
26
+ dotnet-version : 6.x
27
+
28
+ - name : Checkout Stride Docs
29
+ uses : actions/checkout@v3
30
+ with :
31
+ path : stride-docs
32
+
33
+ - name : Checkout Stride (note the LFS)
34
+ uses : actions/checkout@v3
35
+ with :
36
+ repository : stride3d/stride
37
+ token : ${{ secrets.GITHUB_TOKEN }}
38
+ path : stride
39
+ lfs : true
40
+
41
+ - name : Install DocFX
42
+ run : dotnet tool update -g docfx
43
+ # - run: dotnet tool install -g docfx --version 2.65.1
44
+
45
+ - name : Build documentation
46
+ run : ./build-all.bat
47
+ working-directory : stride-docs
48
+
49
+ - name : Compress artifact
50
+ run : 7z a -r DocFX-app.zip ./stride-docs/_site/*
51
+
52
+ - name : Upload artifact for deployment job
53
+ uses : actions/upload-artifact@v3
54
+ with :
55
+ name : DocFX-app
56
+ path : DocFX-app.zip
57
+
58
+ deploy :
59
+ runs-on : windows-2022
60
+ needs : build
61
+ environment :
62
+ name : ' Production'
63
+ url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
64
+
65
+ steps :
66
+ - name : Download artifact from build job
67
+ uses : actions/download-artifact@v3
68
+ with :
69
+ name : DocFX-app
70
+
71
+ # - name: List current directory
72
+ # run: ls
73
+
74
+ - name : Decompress artifact
75
+ run : 7z x DocFX-app.zip "-o./stride-docs/_site"
76
+
77
+ - name : Deploy to Azure Web App
78
+ id : deploy-to-webapp
79
+ uses : azure/webapps-deploy@v2
80
+ with :
81
+ app-name : ' stride-doc'
82
+ slot-name : ' staging'
83
+ publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_32FCD402B970463A9143B24C9B225749 }}
84
+ package : ./stride-docs/_site
0 commit comments