Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
TaylorBeck committed Sep 13, 2024
2 parents 4fba160 + b3f927b commit 016c2ee
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/azure-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PURPLE_WAVE_0100D630F }}
action: 'close'
55 changes: 55 additions & 0 deletions .github/workflows/azure-static-web-apps-witty-beach-0a332111e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}
VITE_FIREBASE_DATABASE_URL: ${{ secrets.VITE_FIREBASE_DATABASE_URL }}
VITE_FIREBASE_PROJECT_ID: ${{ secrets.VITE_FIREBASE_PROJECT_ID }}
VITE_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
VITE_API_URL: ${{ secrets.VITE_API_URL }}
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: 'upload'
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: 'dist' # Built app content directory - optional
app_build_command: 'npm run build'

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_WITTY_BEACH_0A332111E }}
action: 'close'
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,19 @@ Note: Make sure you have Node.js (version 14 or later, ideally 20) and npm insta
3. Navigate to /chickens or /farms to Add/Edit/Delete poultry in your farm and track their health and growth.
4. Each chicken will have a timeline of its measurements:
<img width="424" alt="measurements" src="https://github.com/user-attachments/assets/78e077f5-166a-47f9-8504-3e18f0c64284">
<img width="300" alt="measurements" src="https://github.com/user-attachments/assets/78e077f5-166a-47f9-8504-3e18f0c64284">
6. Then for guest access, use a guest token (created automatically durin): https://poultrypro.net/guest/uniqueAccessToken2
<img width="800" alt="guestAccess" src="https://github.com/user-attachments/assets/e8dbdf21-015c-4e4c-9f4c-1b685efe44e4">
7. A list of your farm business' orders can be accessed at /orders and downloaded as a CSV file.
<img width="1552" alt="orders-page" src="https://github.com/user-attachments/assets/9340e87e-3d79-4cbe-976f-d2a0dceb41bc">
<img width="800" alt="orders-page" src="https://github.com/user-attachments/assets/9340e87e-3d79-4cbe-976f-d2a0dceb41bc">
8. NOTE: Navigating to a path that doesn't exist will end up on the 404 page. Simply go back or sign in again to continue.
- [Usage](#usage)
<img width="800" alt="404" src="https://github.com/user-attachments/assets/ccc8dfd2-c69a-4b97-90c3-6e3a9a2ff6ae">
## Tech Stack and Architecture
Expand All @@ -117,6 +118,7 @@ Note: Make sure you have Node.js (version 14 or later, ideally 20) and npm insta
- Firebase for authentication and real-time database
- Axios for API requests
- Domain hosted in Route 53
- [Github Actions Workflow](https://github.com/TaylorBeck/poultrypro-client/blob/main/.github/workflows/azure-deployment.yml) using Github Action secrets
### Backend
Expand All @@ -126,8 +128,9 @@ Note: Make sure you have Node.js (version 14 or later, ideally 20) and npm insta
- CORS for Cross-Origin Resource Sharing
- Helmet for setting various HTTP headers for security
- Morgan for HTTP request logging
- Dotenv for environment variable management
- Azure App Service Environment Variables for environment variable management
- Azure App Service (P0v3 plan)
- ([Github Action Workflow](https://github.com/TaylorBeck/poultrypro-server/blob/main/.github/workflows/azure-deployment.yml))
- Custom autoscaling rules:
- Scale out: +1 instance when CPU > 70% for 5 minutes
- Scale in: -1 instance when CPU < 25% for 5 minutes
Expand Down

0 comments on commit 016c2ee

Please sign in to comment.