diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d98efcf..a203df8 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -38,7 +38,8 @@ jobs: - name: Install dependencies run: npm ci - name: Build with Astro - run: BASE_URL='pokeapi.co' npm run build + # run: BASE_URL='https://pokeapi.github.io/' npm run build + run: npm run build --site 'https://pokeapi.github.io/' --base 'pokeapi.co' - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: @@ -54,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 diff --git a/astro.config.mjs b/astro.config.mjs index 3b3f5fa..c2abbb4 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,11 +3,11 @@ import starlight from '@astrojs/starlight' import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi' import tailwindcss from '@tailwindcss/vite' -const base_url = process.env.BASE_URL || '' +// const base_url = process.env.BASE_URL || '' export default defineConfig({ site: 'https://pokeapi.co', - base: base_url, + base: '/pokeapi.co' integrations: [ starlight({ title: 'PokéAPI', @@ -26,7 +26,8 @@ export default defineConfig({ // Generate the OpenAPI documentation pages. starlightOpenAPI([ { - base: `${base_url}/v2/openapi`, + // base: `${base_url}/v2/openapi`, + base: `/v2/openapi`, label: 'OpenAPI', schema: 'https://raw.githubusercontent.com/PokeAPI/pokeapi/master/openapi.yml', },