Can pages deploy jobs receive artifacts from previous stages

I have a GitLab CI config that looks something like this:

build:
    stage: build
    script:
        - build site ...
    artifacts:
        paths:
            - _site
    except:
        - master

test:
    stage: test
    dependencies:
        - build
    script:
        - test site ...
    artifacts:
        paths:
            - _site
    except:
        - master

pages:
    stage: deploy
    dependencies:
        - build
        - test
    only:
        - master
    script:
        - mkdir public
        - cp _site/* public/
    artifacts:
        paths:
            - public

stages:
    - build
    - test
    - deploy

The artifacts from the build stage are available in test, but deploy always fails because it can’t find any files in _site.

Is this expected behaviour?

Thanks,

Sarah