Im trying to deploy my site to Gitlab pages. Im able to pass the test stage, but on the deploy stage, I get "missing pages artifacts".
Ive made sure to change public to static in my structure since Gitlab looks for public.
I use pnpm to build the Astro.
Im not entirely sure why its missing artifacts.
Any help is appreciated
gitlab-ci.yml
# Docker image used to build app
image: node:lts
# Functions to be executed before build script is run
before_script:
- corepack enable
- corepack prepare pnpm@latest-8 --activate
- pnpm config set store-dir .pnpm-store
pages:
script:
- pnpm install
artifacts:
paths:
- public
cache:
key:
files:
- pnpm-lock.yaml
paths:
# Folder containing files to be exposed at page URL
- public
- .pnpm-store
rules:
# Ensures only pushes to default branch will trigger pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
astro.config.ts
export default defineConfig({
site: 'https://username.gitlab.io',
//base: '/<project-name>',
outDir: 'public',
publicDir: 'static',
...
})