11name : Azure Static Web Apps CI/CD
2- env :
3- ACTIONS_STEP_DEBUG : true
2+
43on :
54 push :
65 branches :
@@ -16,16 +15,31 @@ jobs:
1615 runs-on : ubuntu-latest
1716 name : Build and Deploy Job
1817 steps :
19- - uses : actions/checkout@v3
18+ - uses : actions/checkout@v2
2019 with :
2120 submodules : true
22- lfs : false
2321 - name : Build And Deploy
2422 id : builddeploy
2523 uses : Azure/static-web-apps-deploy@v1
2624 with :
2725 azure_static_web_apps_api_token : ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FLOWER_0EDF37903 }}
28- repo_token : ${{ secrets.GITHUB_TOKEN }}
26+ repo_token : ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
2927 action : " upload"
30- app_location : " /"
31- output_location : " /dist"
28+ # ##### Repository/Build Configurations - These values can be configured to match your app requirements. ######
29+ # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
30+ app_location : " /" # App source code path
31+ api_location : " " # Api source code path - optional
32+ output_location : " " # Built app content directory - optional
33+ # ##### End of Repository/Build Configurations ######
34+
35+ close_pull_request_job :
36+ if : github.event_name == 'pull_request' && github.event.action == 'closed'
37+ runs-on : ubuntu-latest
38+ name : Close Pull Request Job
39+ steps :
40+ - name : Close Pull Request
41+ id : closepullrequest
42+ uses : Azure/static-web-apps-deploy@v1
43+ with :
44+ azure_static_web_apps_api_token : ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FLOWER_0EDF37903 }}
45+ action : " close"
0 commit comments