|
1 |
| -name: Azure Static Web Apps CI/CD |
2 |
| - |
3 |
| -on: |
4 |
| - push: |
5 |
| - branches: |
6 |
| - - master |
7 |
| - pull_request_target: |
8 |
| - types: [ closed ] |
9 |
| - branches: |
10 |
| - - master |
11 |
| - |
12 |
| -jobs: |
13 |
| - build_and_deploy_job: |
14 |
| - if: github.event_name == 'push' |
15 |
| - runs-on: ubuntu-latest |
16 |
| - name: Build and Deploy Job |
17 |
| - steps: |
18 |
| - - uses: actions/checkout@v3 |
19 |
| - with: |
20 |
| - submodules: true |
21 |
| - - uses: actions/setup-node@v3 |
22 |
| - with: |
23 |
| - node-version: "16.x" |
24 |
| - cache: "yarn" |
25 |
| - - name: Install Dependencies |
26 |
| - run: | |
27 |
| - yarn install --frozen-lockfile --production=false |
28 |
| - - name: Lint |
29 |
| - run: | |
30 |
| - yarn run lint |
31 |
| - - name: Build H5 |
32 |
| - run: | |
33 |
| - yarn run build-dev:h5 |
34 |
| - - name: Build And Deploy |
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_ORANGE_CLIFF_0B1E10000 }} |
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 your app requirements. ###### |
42 |
| - # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig |
43 |
| - app_location: "dist/build/h5" # App source code path |
44 |
| - output_location: "dist/build/h5" # Built app content directory - optional |
45 |
| - ###### End of Repository/Build Configurations ###### |
46 |
| - |
47 |
| - close_pull_request_job: |
48 |
| - if: github.event_name == 'pull_request_target' && github.event.action == 'closed' |
49 |
| - runs-on: ubuntu-latest |
50 |
| - name: Close Pull Request Job |
51 |
| - steps: |
52 |
| - - name: Close Pull Request |
53 |
| - id: closepullrequest |
54 |
| - uses: Azure/static-web-apps-deploy@v1 |
55 |
| - with: |
56 |
| - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_CLIFF_0B1E10000 }} |
57 |
| - action: "close" |
| 1 | +name: Azure Static Web Apps CI/CD |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request_target: |
| 8 | + types: [ closed ] |
| 9 | + branches: |
| 10 | + - master |
| 11 | + |
| 12 | +jobs: |
| 13 | + build_and_deploy_job: |
| 14 | + if: github.event_name == 'push' |
| 15 | + runs-on: ubuntu-latest |
| 16 | + name: Build and Deploy Job |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v3 |
| 19 | + with: |
| 20 | + submodules: true |
| 21 | + - uses: actions/setup-node@v3 |
| 22 | + with: |
| 23 | + node-version: "16.x" |
| 24 | + cache: "yarn" |
| 25 | + - name: Install Dependencies |
| 26 | + run: | |
| 27 | + yarn install --frozen-lockfile --production=false |
| 28 | + - name: Lint |
| 29 | + run: | |
| 30 | + yarn run lint |
| 31 | + - name: Build H5 |
| 32 | + run: | |
| 33 | + yarn run build-dev:h5 |
| 34 | + - name: Build And Deploy |
| 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_ORANGE_CLIFF_0B1E10000 }} |
| 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 your app requirements. ###### |
| 42 | + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig |
| 43 | + app_location: "dist/build/h5" # App source code path |
| 44 | + output_location: "dist/build/h5" # Built app content directory - optional |
| 45 | + ###### End of Repository/Build Configurations ###### |
| 46 | + |
| 47 | + close_pull_request_job: |
| 48 | + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' |
| 49 | + runs-on: ubuntu-latest |
| 50 | + name: Close Pull Request Job |
| 51 | + steps: |
| 52 | + - name: Close Pull Request |
| 53 | + id: closepullrequest |
| 54 | + uses: Azure/static-web-apps-deploy@v1 |
| 55 | + with: |
| 56 | + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_CLIFF_0B1E10000 }} |
| 57 | + action: "close" |
0 commit comments