File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2
+ # More on GitHub Actions for Azure: https://github.com/Azure/actions
3
+ # More on OpenID Connect: https://github.com/azure/login#github-action-for-azure-login
4
+
5
+ name : Publish OData org website to Azure Web App staging slot
6
+
7
+ on :
8
+ push :
9
+ branches :
10
+ - master
11
+ workflow_dispatch : # Makes it possible to trigger workflow manually
12
+
13
+ jobs :
14
+ build_and_deploy_job :
15
+ permissions : # Required when using OpenID Connect based federated identity credentials
16
+ id-token : write
17
+ contents : read
18
+
19
+ if : github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
20
+ runs-on : ubuntu-latest
21
+
22
+ steps :
23
+ - uses : actions/checkout@v3
24
+ with :
25
+ lfs : true # Forces LFS files (images in our case) to be checked out
26
+ submodules : ' recursive' # Check out submodules if applicable
27
+
28
+ - name : Build the site in a jekyll/builder container
29
+ run : |
30
+ docker run \
31
+ -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
32
+ jekyll/builder:stable /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
33
+
34
+ - name : Log in with Azure # Using OpenID Connect
35
+ uses : azure/login@v1
36
+ with :
37
+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
38
+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
39
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
40
+
41
+ - name : Deploy to Azure Web App
42
+ uses : azure/webapps-deploy@v2
43
+ with :
44
+ app-name : ' odata-prod'
45
+ slot-name : ' odata-prod-stage' # Specify the staging slot
46
+ package : ${{ github.workspace }}/_site
You can’t perform that action at this time.
0 commit comments