Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swa demo #12

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d305ee5
ci: add Azure Static Web Apps workflow file
jessieyyt May 24, 2023
ad7d994
ci: add Azure Static Web Apps workflow file
jessieyyt May 25, 2023
53cec1d
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
b248f82
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
3b7c0d9
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
308e982
Update azure-static-web-apps-orange-wave-0faefb312.yml
jessieyyt May 26, 2023
bb8e81f
Update azure-static-web-apps-orange-wave-0faefb312.yml
jessieyyt May 26, 2023
4ba27d0
Update package.json
jessieyyt May 26, 2023
68d68ca
Update package.json
jessieyyt May 26, 2023
8641cf3
Update package.json
jessieyyt May 26, 2023
823f53d
Update azure-static-web-apps-witty-bush-05ff76c12.yml
jessieyyt May 26, 2023
75a0e05
Update azure-static-web-apps-mango-moss-0a036b112.yml
jessieyyt May 26, 2023
3a2a539
Update azure-static-web-apps-purple-coast-048538212.yml
jessieyyt May 26, 2023
c6de8b1
Update azure-static-web-apps-witty-field-058db4112.yml
jessieyyt May 26, 2023
53c6e37
Update azure-static-web-apps-mango-moss-0a036b112.yml
jessieyyt May 26, 2023
6e6c29c
Update azure-static-web-apps-orange-wave-0faefb312.yml
jessieyyt May 26, 2023
946dc4e
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
565f434
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
7528dfe
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
9107934
ci: add Azure Static Web Apps workflow file
jessieyyt May 26, 2023
0b33d11
ci: add Azure Static Web Apps workflow file
jessieyyt May 29, 2023
2940db8
ci: add Azure Static Web Apps workflow file
jessieyyt May 29, 2023
5636168
ci: add Azure Static Web Apps workflow file
jessieyyt May 30, 2023
32d09b2
ci: add Azure Static Web Apps workflow file
jessieyyt May 30, 2023
6f3915e
ci: add Azure Static Web Apps workflow file
jessieyyt May 30, 2023
a161b26
ci: add Azure Static Web Apps workflow file
jessieyyt May 30, 2023
447785c
Create staticwebapp.config.json
jessieyyt Jun 20, 2023
248c9e8
ci: add Azure Static Web Apps workflow file
jessieyyt Dec 22, 2024
411e4ce
Delete .github/workflows/azure-static-web-apps-wonderful-field-0c9217…
jessieyyt Dec 22, 2024
ec2c58b
Delete .github/workflows/azure-static-web-apps-witty-hill-06b486112.yml
jessieyyt Dec 22, 2024
f5a54bb
Delete .github/workflows/azure-static-web-apps-witty-field-058db4112.yml
jessieyyt Dec 22, 2024
5252c53
Delete .github/workflows/azure-static-web-apps-witty-bush-05ff76c12.yml
jessieyyt Dec 22, 2024
1e600b8
Delete .github/workflows/azure-static-web-apps-white-beach-0a88c8112.yml
jessieyyt Dec 22, 2024
4177f3a
Delete .github/workflows/azure-static-web-apps-purple-coast-048538212…
jessieyyt Dec 22, 2024
be4b3bd
Delete .github/workflows/azure-static-web-apps-proud-field-07949ae12.yml
jessieyyt Dec 22, 2024
eb59f6d
Delete .github/workflows/azure-static-web-apps-orange-wave-0faefb312.yml
jessieyyt Dec 22, 2024
c219e83
Delete .github/workflows/azure-static-web-apps-mango-moss-0a036b112.yml
jessieyyt Dec 22, 2024
2ce1472
Delete .github/workflows/azure-static-web-apps-kind-meadow-09adab812.yml
jessieyyt Dec 22, 2024
01a2fff
Delete .github/workflows/azure-static-web-apps-jolly-hill-02e716812.yml
jessieyyt Dec 22, 2024
8690c89
Delete .github/workflows/azure-static-web-apps-happy-ocean-05ed59c12.yml
jessieyyt Dec 22, 2024
2ece2dd
Delete .github/workflows/azure-static-web-apps-delightful-wave-09c564…
jessieyyt Dec 22, 2024
a67fe2c
Delete .github/workflows/azure-static-web-apps-agreeable-ocean-0ab140…
jessieyyt Dec 22, 2024
b619161
Delete .github/workflows/azure-static-web-apps-agreeable-wave-0e9c271…
jessieyyt Dec 22, 2024
7d1abce
Create staticwebapp.database.config.json
jessieyyt Dec 24, 2024
409b772
Create staticwebapp.database.schema.gql
jessieyyt Dec 24, 2024
66f18d3
Update staticwebapp.database.config.json
jessieyyt Dec 24, 2024
5649287
Delete swa-db-connections/staticwebapp.database.schema.gql
jessieyyt Dec 25, 2024
a9b3057
Update staticwebapp.database.config.json
jessieyyt Dec 25, 2024
cc58517
ci: add Azure Static Web Apps workflow file
jessieyyt Dec 26, 2024
9c5d380
Delete tests directory
jessieyyt Dec 26, 2024
7b7b385
Update staticwebapp.config.json
jessieyyt Dec 26, 2024
a5b8292
Delete src/staticwebapp.config.json
jessieyyt Dec 26, 2024
bbccac0
Delete swa-db-connections directory
jessieyyt Dec 27, 2024
84525f2
Create staticwebapp.database.config.json
jessieyyt Dec 27, 2024
58e3bd9
Delete .github/workflows/azure-static-web-apps-lemon-pebble-0778f0610…
jessieyyt Dec 27, 2024
2fc6c7b
ci: add Azure Static Web Apps workflow file
jessieyyt Dec 27, 2024
917edd2
Create staticwebapp.config.json
jessieyyt Dec 27, 2024
74db06d
demo
jessieyyt Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_SMOKE_0FD019710 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "./src" # App source code path
api_location: "./api" # Api source code path - optional
output_location: "." # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_SMOKE_0FD019710 }}
action: "close"
46 changes: 46 additions & 0 deletions .github/workflows/azure-static-web-apps-blue-water-088c66f10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLUE_WATER_088C66F10 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "./src" # App source code path
api_location: "./api" # Api source code path - optional
output_location: "." # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLUE_WATER_088C66F10 }}
action: "close"
4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
<title>Vanilla JavaScript App</title>
<title>Vanilla Static web App</title>
</head>

<body>
<main>
<h1>Vanilla JavaScript App</h1>
<h1>Vanilla Static web App</h1>
<p>Loading content from the API: <b id="message"></b></b></p>
</main>
</body>
Expand Down
17 changes: 17 additions & 0 deletions src/staticwebapp.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"navigationFallback": {
"rewrite": "/index.html"
},
"routes": [
{
"route": "/*",
"allowedRoles": [ "authenticated" ]
}
],
"responseOverrides": {
"401": {
"statusCode": 302,
"redirect": "/.auth/login/aad"
}
}
}
42 changes: 42 additions & 0 deletions swa-db-connections/staticwebapp.database.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://dataapibuilder.azureedge.net/schemas/latest/dab.draft.schema.json",
"data-source": {
"database-type": "mssql",
"options": {
"set-session-context": false
},
"connection-string": "@env('DATABASE_CONNECTION_STRING')"
},
"runtime": {
"rest": {
"enabled": true,
"path": "/rest"
},
"graphql": {
"allow-introspection": true,
"enabled": true,
"path": "/graphql"
},
"host": {
"mode": "production",
"cors": {
"origins": ["http://localhost:4280"],
"allow-credentials": false
},
"authentication": {
"provider": "StaticWebApps"
}
}
},
"entities": {
"Person": {
"source": "dbo.MyTestPersonTable",
"permissions": [
{
"actions": ["*"],
"role": "anonymous"
}
]
}
}
}
3 changes: 0 additions & 3 deletions tests/Test.README.md

This file was deleted.

8 changes: 0 additions & 8 deletions tests/playwright.spec.ts

This file was deleted.