Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 0 additions & 23 deletions .github/workflows/ninja_i18n.yml

This file was deleted.

144 changes: 72 additions & 72 deletions .github/workflows/main_az204svelte.yml → .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Node.js app to Azure Web App - az204svelte
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read #This is required for actions/checkout
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install dependencies and build
working-directory: ./svelte-demo
run: |
npm install
npm run build
- name: Zip artifact for deployment
working-directory: ./svelte-demo
run: zip -r ../release.zip ./*
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip
deploy-staging:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write #This is required for requesting the JWT
contents: read #This is required for actions/checkout
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app
- name: Unzip artifact for deployment
run: unzip release.zip
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6825A8BBB6054717A51D3387CB0BDAA2 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F0A2C46FD2B74B6EBF701F4F68664556 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6A39DE00D4CD4142A2B79B40F2FB0C5A }}
- name: 'Deploy to Azure Web App Staging'
id: deploy-to-webapp-staging
uses: azure/webapps-deploy@v3
with:
app-name: 'az204svelte'
slot-name: 'stage1'
package: '.'
name: Build and deploy to production

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install dependencies and build
working-directory: ./weather-app
run: |
npm install
npm run build

- name: Zip artifact for deployment
working-directory: ./weather-app
run: zip -r ../release.zip ./*

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip

deploy-staging:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp-prod.outputs.webapp-url }}
permissions:
id-token: write
contents: read

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6825A8BBB6054717A51D3387CB0BDAA2 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F0A2C46FD2B74B6EBF701F4F68664556 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6A39DE00D4CD4142A2B79B40F2FB0C5A }}

- name: 'Deploy to Azure Web App Staging'
id: deploy-to-webapp-prod
uses: azure/webapps-deploy@v3
with:
app-name: 'az204svelte'
slot-name: 'az204svelte'
package: '.'
72 changes: 72 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build and deploy to staging

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install dependencies and build
working-directory: ./weather-app
run: |
npm install
npm run build

- name: Zip artifact for deployment
working-directory: ./weather-app
run: zip -r ../release.zip ./*


- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip

deploy-staging:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Staging'
url: ${{ steps.deploy-to-webapp-staging.outputs.webapp-url }}
permissions:
id-token: write
contents: read

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_F0A2C46FD2B74B6EBF701F4F68664556 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_6A39DE00D4CD4142A2B79B40F2FB0C5A }}

- name: 'Deploy to Azure Web App Staging'
id: deploy-to-webapp-staging
uses: azure/webapps-deploy@v3
with:
app-name: 'az204svelte'
slot-name: 'stage1'
package: '.'
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-azuretools.vscode-azurefunctions",
"vscjava.vscode-java-debug"
]
}
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Java Functions",
"type": "java",
"request": "attach",
"hostName": "127.0.0.1",
"port": 5005,
"preLaunchTask": "func: host start"
}
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"azureFunctions.javaBuildTool": "gradle",
"azureFunctions.deploySubpath": "weather-alert/build/azure-functions/weather-alert-1742571987789",
"azureFunctions.projectLanguage": "Java",
"azureFunctions.projectRuntime": "~4",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "package (functions)",
"java.configuration.updateBuildConfiguration": "interactive"
}
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "func",
"label": "func: host start",
"command": "host start",
"problemMatcher": "$func-java-watch",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/weather-alert/build/azure-functions/weather-alert-1742570139518"
},
"dependsOn": "package (functions)"
},
{
"label": "package (functions)",
"command": "gradle azureFunctionsPackage",
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}/weather-alert"
}
}
]
}
5 changes: 0 additions & 5 deletions svelte-demo/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions svelte-demo/messages/en.json

This file was deleted.

Loading