diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0210354086d781794751660754a0194af4bf0e7..a1d5459ecc5f50f7e01cf982197d39737b6f8752 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,11 @@ # The Docker image that will be used to build your app image: node:16.13.2-slim +variables: + ASTRO_URL: "https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}" + ASTRO_BASE: "/${CI_PROJECT_NAMESPACE}" + + pages: stage: deploy tags: @@ -10,6 +15,7 @@ pages: - node_modules/ script: # Specify the steps involved to build your app here + - echo "Astro full URL is ${ASTRO_URL}${ASTRO_BASE}" - npm ci - npm run build artifacts: diff --git a/astro.config.mjs b/astro.config.mjs index 3f486da07e055063413d21d980d307ab95f1b6c5..20830de1590483178b173c76345c9642c481e395 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,6 +6,6 @@ export default defineConfig({ sitemap: true, outDir: 'public', publicDir: 'static', - site: 'https://froggit.froggit.page', - base: '/poc/astrojs' + site: process.env.ASTRO_URL ||'https://domain.tld', + base: process.env.ASTRO_BASE || '/' });