microsoft/AI-For-Beginners

Public

mirrored fromhttps://github.com/microsoft/AI-For-BeginnersAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0569120dcae1ee8d441734209dd6b45ac046e9b3

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/azure-static-web-apps-red-field-0a6ddfd03.yml

62lines · modecode

1name: Azure Static Web Apps CI/CD
2
3on:
4 push:
5 branches:
6 - main
7 pull_request:
8 types: [opened, synchronize, reopened, closed]
9 branches:
10 - main
11
12jobs:
13 build_and_deploy_job:
14 permissions:
15 actions: write
16 checks: none
17 if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
18 runs-on: ubuntu-latest
19 permissions:
20 actions: read
21 contents: read
22 deployments: read
23 packages: none
24 pull-requests: write
25 security-events: write
26 name: Build and Deploy Job
27 steps:
28 - uses: actions/checkout@v2
29 with:
30 submodules: true
31 - name: Build And Deploy
32 id: builddeploy
33 uses: Azure/static-web-apps-deploy@v1
34 with:
35 azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_RED_FIELD_0A6DDFD03 }}
36 repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
37 action: "upload"
38 ###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
39 # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
40 app_location: "/etc/quiz-app" # App source code path
41 api_location: "" # Api source code path - optional
42 output_location: "dist" # Built app content directory - optional
43 ###### End of Repository/Build Configurations ######
44
45 close_pull_request_job:
46 if: github.event_name == 'pull_request' && github.event.action == 'closed'
47 runs-on: ubuntu-latest
48 name: Close Pull Request Job
49 permissions:
50 actions: read
51 contents: read
52 deployments: read
53 packages: none
54 pull-requests: write
55 security-events: write
56 steps:
57 - name: Close Pull Request
58 id: closepullrequest
59 uses: Azure/static-web-apps-deploy@v1
60 with:
61 azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_RED_FIELD_0A6DDFD03 }}
62 action: "close"
63