1- name : Azure Static Web Apps CI/CD
1+ name : ci
22
33on :
44 push :
1010 - main
1111
1212jobs :
13- build_and_deploy_job :
14- env :
15- AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F : ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
13+ build :
1614 runs-on : ubuntu-latest
17- permissions :
18- contents : read
19- pull-requests : write
20- name : Build and Deploy Job
2115 steps :
2216 - uses : actions/checkout@v2
2317 with :
2418 submodules : true
25- - name : Setup Node
26- uses : actions/setup-node@v4
27- with :
28- node-version : 22
29- - name : Run build
19+ - name : build
3020 run : |
31- echo $PWD
32- ./build.sh
33- - name : Build And Deploy
34- if : (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')) && env.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F != ''
35- id : builddeploy
36- uses : Azure/static-web-apps-deploy@v1
37- with :
38- azure_static_web_apps_api_token : ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
39- repo_token : ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
40- action : " upload"
41- # ##### Repository/Build Configurations - These values can be configured to match you app requirements. ######
42- # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
43- app_location : " /root" # App source code path
44- api_location : " api" # Api source code path - optional
45- app_artifact_location : " " # Built app content directory - optional
46- # ##### End of Repository/Build Configurations ######
47-
48- close_pull_request_job :
49- env :
50- AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F : ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
51- runs-on : ubuntu-latest
52- permissions :
53- contents : read
54- pull-requests : write
55- issues : write
56- name : Close Pull Request Job
57- steps :
58- - name : Close Pull Request
59- if : (github.event_name == 'pull_request' && github.event.action == 'closed') && env.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F != ''
60- id : closepullrequest
61- uses : Azure/static-web-apps-deploy@v1
62- with :
63- app_location : " /root" # App source code path
64- azure_static_web_apps_api_token : ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
65- action : " close"
21+ docker build .
0 commit comments