Skip to content

Commit 64b6387

Browse files
committed
1 parent 45b8a1b commit 64b6387

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
- name: Install dependencies
3939
run: npm ci
4040
- name: Build with Astro
41-
run: BASE_URL='pokeapi.co' npm run build
41+
# run: BASE_URL='https://pokeapi.github.io/' npm run build
42+
run: npm run build --site 'https://pokeapi.github.io/' --base 'pokeapi.co'
4243
- name: Upload artifact
4344
uses: actions/upload-pages-artifact@v3
4445
with:
@@ -54,4 +55,4 @@ jobs:
5455
steps:
5556
- name: Deploy to GitHub Pages
5657
id: deployment
57-
uses: actions/deploy-pages@v4
58+
uses: actions/deploy-pages@v4

astro.config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import starlight from '@astrojs/starlight'
33
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
44
import tailwindcss from '@tailwindcss/vite'
55

6-
const base_url = process.env.BASE_URL || ''
6+
// const base_url = process.env.BASE_URL || ''
77

88
export default defineConfig({
99
site: 'https://pokeapi.co',
10-
base: base_url,
10+
base: '/pokeapi.co',
1111
integrations: [
1212
starlight({
1313
title: 'PokéAPI',
@@ -26,7 +26,8 @@ export default defineConfig({
2626
// Generate the OpenAPI documentation pages.
2727
starlightOpenAPI([
2828
{
29-
base: `${base_url}/v2/openapi`,
29+
// base: `${base_url}/v2/openapi`,
30+
base: `/v2/openapi`,
3031
label: 'OpenAPI',
3132
schema: 'https://raw.githubusercontent.com/PokeAPI/pokeapi/master/openapi.yml',
3233
},

0 commit comments

Comments
 (0)