Skip to content

Commit

Permalink
fix(site): set PUBLIC_API_BASE_URL during build (#36)
Browse files Browse the repository at this point in the history
* pass worker url to frontend at build time

* local envs to .env.local
  • Loading branch information
veeti-k committed Sep 2, 2023
1 parent f0d0816 commit ca9b405
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- run: |
pnpm install
pnpm build
env:
PUBLIC_API_BASE_URL: https://api.admin-e68.workers.dev/
- name: Deploy
working-directory: ./packages/site
Expand Down
1 change: 1 addition & 0 deletions packages/site/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUBLIC_API_BASE_URL=http://localhost:3000/oulu-dev-meetups/api
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"version": "0.0.1",
"scripts": {
"dev": "PUBLIC_API_BASE_URL=http://127.0.0.1:8787 astro dev",
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"deploy": "touch dist/.nojekyll && gh-pages --dist dist --dotfiles true",
Expand Down

0 comments on commit ca9b405

Please sign in to comment.