Skip to content

Commit

Permalink
config url set from env variable in production
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkersigirci committed Jul 5, 2024
1 parent f2f7733 commit 45e073e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- name: build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
PUBLIC_URL: "https://ilkersigirci.github.io"
run: |
bun run build
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ bun run preview

- Open vercel dashboard of your project
- For project command overrides
- General -> Build & Development Settings
- Settings -> General -> Build & Development Settings
- Build command: bun run build
- Output directory: build
- Install command: bun i
- Development command: bun run dev
- For environment variables
- Go to Settings -> Environment Variables
- PUBLIC_URL = https://blog.ilkerflix.com
- For custom Ignored Build Step
- Go to Settings -> Git -> Ignored Build Step -> Project Settings
- Custom -> if [ "$VERCEL_GIT_COMMIT_REF" == "gh-pages" ]; then exit 0; else exit 1; fi
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import { base } from '$app/paths'

export const title = 'Ilkerflix'
export const description = 'Ilkerflix'
export const url = (dev ? 'http://localhost:5173' : 'https://blog.ilkerflix.com') + base
export const url = (dev ? 'http://localhost:5173' : process.env.PUBLIC_URL) + base

0 comments on commit 45e073e

Please sign in to comment.