Skip to content

Commit

Permalink
Merge pull request #48 from dhrumilp12/dev
Browse files Browse the repository at this point in the history
Merging new Dev changes to main
  • Loading branch information
janthonysantana authored Jun 26, 2024
2 parents 8dcd4a2 + 5758d96 commit 6618df3
Show file tree
Hide file tree
Showing 28 changed files with 1,360 additions and 252 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/azure-static-web-apps-green-sand-04b157b0f.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:
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev

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_GREEN_SAND_04B157B0F }}
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: "./client" # App source code path
api_location: "" # Api source code path - optional
output_location: "dist" # 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_GREEN_SAND_04B157B0F }}
action: "close"
46 changes: 46 additions & 0 deletions .github/workflows/azure-static-web-apps-lemon-forest-0b12e820f.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:
- dev
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev

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_LEMON_FOREST_0B12E820F }}
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: "./client" # App source code path
api_location: "" # Api source code path - optional
output_location: "dist" # 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_LEMON_FOREST_0B12E820F }}
action: "close"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Azure Static Web Apps CI/CD

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

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_POLITE_GROUND_0EFF54D0F }}
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: "./client" # App source code path
api_location: "" # Api source code path - optional
output_location: "dist" # 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_POLITE_GROUND_0EFF54D0F }}
action: "close"
71 changes: 71 additions & 0 deletions .github/workflows/dev_earlent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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 - earlent

on:
push:
branches:
- dev
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Zip artifact for deployment
run: zip release.zip ./* -r

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

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT

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

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

- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_9BD5731DC96F49B3947E8FB29084365D }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_175C998FDC464558BB2568F7D06919CF }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_CB50195BF2D54DD6890F18EA62640C1B }}

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'earlent'
slot-name: 'Production'
package: .

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Trigger auto deployment for earlent

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ dev ]
paths:
- '**'
- '.github/workflows/earlent-AutoDeployTrigger-63bcd090-148d-46b7-b34b-2cb4b1971f2a.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
contents: read #Required when GH token is used to authenticate with private repo

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.EARLENT_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.EARLENT_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.EARLENT_AZURE_SUBSCRIPTION_ID }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: earlent.azurecr.io
registryUsername: ${{ secrets.EARLENT_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.EARLENT_REGISTRY_PASSWORD }}
containerAppName: earlent
resourceGroup: mental_health_companion
imageToBuild: earlent.azurecr.io/earlent:${{ github.sha }}
_buildArgumentsKey_: |
_buildArgumentsValues_
1 change: 1 addition & 0 deletions client/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=https://earlent.thankfulpebble-55902899.westus2.azurecontainerapps.io/api
2 changes: 1 addition & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
dist

dist-ssr
*.local

Expand Down
Binary file added client/dist/assets/Aria-BMTE8U_Y.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions client/dist/assets/index-B_Zi3VXB.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6618df3

Please sign in to comment.