From 23f7e81147753b40dac98563975b798a9974ffd4 Mon Sep 17 00:00:00 2001 From: GozCode <40898932+cgonzalezdev@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:59:55 -0500 Subject: [PATCH 1/7] Create create-deploy.yml Deployment initial --- .github/workflows/create-deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/create-deploy.yml diff --git a/.github/workflows/create-deploy.yml b/.github/workflows/create-deploy.yml new file mode 100644 index 0000000..8e2e026 --- /dev/null +++ b/.github/workflows/create-deploy.yml @@ -0,0 +1,24 @@ +name: Create Azure resources +on: [workflow_dispatch] +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + + # Checkout codes + - uses: actions/checkout@main + + # Log into Azure + - uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + # Deploy Bicep file + - name: create resources + uses: azure/arm-deploy@v1 + with: + subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }} + resourceGroupName: ${{ vars.AZURE_RG }} + template: ${{ github.workspace }}/config/main.bicep + parameters: 'namePrefix=${{ vars.AZURE_PREFIX }}' + failOnStdErr: false From c50282c5d4820547c48ed1b9dd063f0c6a248390 Mon Sep 17 00:00:00 2001 From: GozCode <40898932+cgonzalezdev@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:40:54 -0500 Subject: [PATCH 2/7] Create azure-deploy.yml --- .github/workflows/azure-deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/azure-deploy.yml diff --git a/.github/workflows/azure-deploy.yml b/.github/workflows/azure-deploy.yml new file mode 100644 index 0000000..b43f661 --- /dev/null +++ b/.github/workflows/azure-deploy.yml @@ -0,0 +1,25 @@ + name: Deploy to Azure + on: + push: + branches: + - main + + jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to Azure + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - name: Build and deploy Container App + uses: azure/container-apps-deploy-action@v1 + with: + appSourcePath: ${{ github.workspace }} + acrName: ${{ vars.AZURE_PREFIX }}acr + resourceGroup: ${{ vars.AZURE_RG }} + containerAppName: ${{ vars.AZURE_PREFIX }}containerapp From 724268dee4be0f9c877d51d9a9633dedc79897c6 Mon Sep 17 00:00:00 2001 From: GozCode <40898932+cgonzalezdev@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:41:14 -0500 Subject: [PATCH 3/7] Update main.bicep --- config/main.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/main.bicep b/config/main.bicep index 42e6d0a..c460d0c 100644 --- a/config/main.bicep +++ b/config/main.bicep @@ -108,7 +108,7 @@ resource containerApp 'Microsoft.App/containerApps@2022-03-01' = { configuration: { ingress: { external: true - targetPort: 80 + targetPort: 3000 allowInsecure: false traffic: [ { From 234c0995a1f790ff399c98aec3791623aac228a5 Mon Sep 17 00:00:00 2001 From: GozCode <40898932+cgonzalezdev@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:56:35 -0500 Subject: [PATCH 4/7] Update style.css --- src/css/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/css/style.css b/src/css/style.css index adf9cf1..18525a9 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -185,3 +185,11 @@ li { h1 { text-align: center; } + +.author { + font-size: 22px; + font-weight: bold; + background: #8e24aa; + color: #fff; + width: 270px; +} From 104e3a803696576675e9f80e1f4208157909602c Mon Sep 17 00:00:00 2001 From: GozCode <40898932+cgonzalezdev@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:57:19 -0500 Subject: [PATCH 5/7] Update Hours.js --- src/components/Hours.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/components/Hours.js b/src/components/Hours.js index d51ab5c..0ecdba9 100644 --- a/src/components/Hours.js +++ b/src/components/Hours.js @@ -1 +1,32 @@ -// Placeholder to host a component +import React from "react"; + + const Hours = () => { + // add logic + + const shelterHours = [ + { day: "Monday", open: "10:00", close: "16:00" }, + { day: "Tuesday", open: "10:00", close: "16:00" }, + { day: "Wednesday", open: "10:00", close: "16:00" }, + { day: "Thursday", open: "10:00", close: "16:00" }, + { day: "Friday", open: "10:00", close: "16:00" }, + { day: "Saturday", open: "9:00", close: "20:00" }, + { day: "Sunday", open: "9:00", close: "20:00" }, + + ] + + // get the long day name and store it in a variable called today + const today = new Date().toLocaleDateString('en-US', { weekday: 'long' }); + + // get today's hours + const todayHours = shelterHours.find((day) => day.day === today); + + // display today and the hours in an div with an id of hours + return ( +
{todayHours.day} {todayHours.open} - {todayHours.close}
+Autor: Carlos J. Gonzalez
+