Skip to content

Commit f54162e

Browse files
author
Azure Static Web Apps
committed
Azure Static Web Apps added workflow file for CI/CD
1 parent d17468f commit f54162e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Azure Static Web Apps CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened, closed]
9+
branches:
10+
- master
11+
12+
jobs:
13+
build_and_deploy_job:
14+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
15+
runs-on: ubuntu-latest
16+
name: Build and Deploy Job
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Build And Deploy
20+
id: builddeploy
21+
uses: Azure/static-web-apps-deploy@v0.0.1-preview
22+
with:
23+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_STONE_0FE616C1E }}
24+
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
25+
action: 'upload'
26+
###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
27+
app_location: '/' # App source code path
28+
api_location: 'api' # Api source code path - optional
29+
app_artifact_location: '' # Built app content directory - optional
30+
###### End of Repository/Build Configurations ######
31+
32+
close_pull_request_job:
33+
if: github.event_name == 'pull_request' && github.event.action == 'closed'
34+
runs-on: ubuntu-latest
35+
name: Close Pull Request Job
36+
steps:
37+
- name: Close Pull Request
38+
id: closepullrequest
39+
uses: Azure/static-web-apps-deploy@v0.0.1-preview
40+
with:
41+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_STONE_0FE616C1E }}
42+
action: 'close'

0 commit comments

Comments
 (0)