Skip to content

Commit 384fc8d

Browse files
authored
Merge pull request #9 from MatheusDubin/remove-production-api-string
fix: remove hardcoded production string as fallback from no VITE_API_…
2 parents d2f0a55 + 0dd354e commit 384fc8d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818

1919
- run: npm install
2020

21+
- name: Create .env file
22+
run: |
23+
touch .env
24+
echo VITE_API_URL=${{ secrets.VITE_API_URL }} >> .env
25+
cat .env
26+
2127
- run: npm run build
2228

2329
- uses: aws-actions/configure-aws-credentials@v1

src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios, { AxiosRequestHeaders } from 'axios';
22

33
const api = axios.create({
4-
baseURL: import.meta.env.VITE_API_URL ?? 'https://api.sos-rs.com',
4+
baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:4000/',
55
});
66

77
api.interceptors.request.use((config) => {

0 commit comments

Comments
 (0)