feat: add production environment variables and update Gitea workflow for deployment
This commit is contained in:
parent
1f2a71452b
commit
2487076e92
7
.env.production
Normal file
7
.env.production
Normal file
@ -0,0 +1,7 @@
|
||||
VITE_FIREBASE_API_KEY=VITE_FIREBASE_API_KEY
|
||||
VITE_FIREBASE_AUTH_DOMAIN=VITE_FIREBASE_AUTH_DOMAIN
|
||||
VITE_FIREBASE_PROJECT_ID=VITE_FIREBASE_PROJECT_ID
|
||||
VITE_FIREBASE_STORAGE_BUCKET=VITE_FIREBASE_STORAGE_BUCKET
|
||||
VITE_FIREBASE_MESSAGING_SENDER_ID=VITE_FIREBASE_MESSAGING_SENDER_ID
|
||||
VITE_FIREBASE_APP_ID=VITE_FIREBASE_APP_ID
|
||||
VITE_FIREBASE_MEASUREMENT_ID=VITE_FIREBASE_MEASUREMENT_ID
|
@ -1,6 +1,9 @@
|
||||
name: Main Build & Deploy
|
||||
|
||||
on: workflow_dispatch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -41,6 +44,9 @@ jobs:
|
||||
name: Deploy Live
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
environment:
|
||||
name: production
|
||||
url: https://pet.ivanch.me # adjust this URL as needed
|
||||
|
||||
steps:
|
||||
- name: Recreate container
|
||||
|
2
env.sh
2
env.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
for i in $(env | grep MY_APP_)
|
||||
for i in $(env | grep VITE_)
|
||||
do
|
||||
key=$(echo $i | cut -d '=' -f 1)
|
||||
value=$(echo $i | cut -d '=' -f 2-)
|
||||
|
@ -2,7 +2,7 @@ import { ApiConfig } from './types';
|
||||
|
||||
// API configuration
|
||||
export const apiConfig: ApiConfig = {
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:5278',
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL || 'VITE_API_BASE_URL',
|
||||
timeout: 10000, // 10 seconds
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
Loading…
x
Reference in New Issue
Block a user