Skip to content

Commit 0a191de

Browse files
committed
ci: add Azure Static Web Apps workflow file
1 parent f7edaec commit 0a191de

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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@v2
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_GRAY_PLANT_049754E10 }}
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+
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
28+
app_location: '/' # App source code path
29+
api_location: 'api' # Api source code path - optional
30+
app_artifact_location: '' # Built app content directory - optional
31+
###### End of Repository/Build Configurations ######
32+
33+
close_pull_request_job:
34+
if: github.event_name == 'pull_request' && github.event.action == 'closed'
35+
runs-on: ubuntu-latest
36+
name: Close Pull Request Job
37+
steps:
38+
- name: Close Pull Request
39+
id: closepullrequest
40+
uses: Azure/static-web-apps-deploy@v0.0.1-preview
41+
with:
42+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GRAY_PLANT_049754E10 }}
43+
action: 'close'

0 commit comments

Comments
 (0)