ci: only set site and base during deployment

This commit is contained in:
Joakim Carlstein 2023-12-18 15:38:42 +01:00
parent f63fa9d864
commit e245d6f18a
3 changed files with 11 additions and 3 deletions

View file

@ -22,6 +22,9 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install, build, and upload your site output - name: Install, build, and upload your site output
uses: withastro/action@v1 uses: withastro/action@v1
environment:
ASTRO_SITE: 'https://aboviq.github.io'
ASTRO_BASE: '/emigrate'
with: with:
path: ./docs # The root location of your Astro project inside the repository. (optional) path: ./docs # The root location of your Astro project inside the repository. (optional)
node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 18. (optional) node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)

View file

@ -1,11 +1,12 @@
import process from 'node:process';
import { defineConfig } from 'astro/config'; import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight'; import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind'; import tailwind from '@astrojs/tailwind';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://aboviq.github.io', site: process.env.ASTRO_SITE,
base: '/emigrate', base: process.env.ASTRO_BASE,
integrations: [ integrations: [
starlight({ starlight({
title: 'Emigrate', title: 'Emigrate',

View file

@ -20,5 +20,9 @@
"astro": "^4.0.1", "astro": "^4.0.1",
"sharp": "^0.32.5", "sharp": "^0.32.5",
"tailwindcss": "^3.3.6" "tailwindcss": "^3.3.6"
} },
"volta": {
"extends": "../../package.json"
},
"packageManager": "pnpm@8.10.2"
} }