diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f389a18c..cf909973 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,12 @@ jobs: - run: npm install + - name: Create .env file + run: | + touch .env + echo VITE_API_URL=${{ secrets.VITE_API_URL }} >> .env + cat .env + - run: npm run build - uses: aws-actions/configure-aws-credentials@v1 diff --git a/src/api/api.ts b/src/api/api.ts index cd107b78..84fb5cb8 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,7 +1,7 @@ import axios, { AxiosRequestHeaders } from 'axios'; const api = axios.create({ - baseURL: import.meta.env.VITE_API_URL ?? 'https://api.sos-rs.com', + baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:4000/', }); api.interceptors.request.use((config) => {