build: used env to specify base and url
This commit is contained in:
parent
08f249ca35
commit
83f8c84a04
3 changed files with 7 additions and 3 deletions
1
.astro/types.d.ts
vendored
1
.astro/types.d.ts
vendored
|
|
@ -1,2 +1 @@
|
||||||
/// <reference types="astro/client" />
|
/// <reference types="astro/client" />
|
||||||
/// <reference path="content.d.ts" />
|
|
||||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -26,6 +26,8 @@ jobs:
|
||||||
uses: withastro/action@v4
|
uses: withastro/action@v4
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SITE_BASE: gameflow-website
|
||||||
|
SITE_URL: https://simeonradivoev.github.io
|
||||||
with:
|
with:
|
||||||
package-manager: "bun"
|
package-manager: "bun"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite'
|
||||||
|
import { loadEnv } from 'vite';
|
||||||
|
|
||||||
|
const env = loadEnv(process.env.NODE_ENV, process.cwd(), '');
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://simeonradivoev.github.io',
|
site: env.SITE_URL,
|
||||||
base: '/gameflow',
|
base: `/${env.SITE_BASE}`,
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
tailwindcss()
|
tailwindcss()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue