unknown keyword pages while enabling pages to gitlab-ci

I have the following in my .gitlab-ci.yml

 ---
 test-foo-bar:
    before_script:
      - pwd
      - GIT_SSL_NO_VERIFY=true git clone https://192.168.122.1/foobar/myproj
      - cd myproj
      - ansible-playbook provision.yml -e test_suite_name=test-foo-bar
      - export ANSIBLE_HOST_KEY_CHECKING=False
      - chmod 0600 ssh_priv_key
   script:
     - ansible-playbook runtest.yml -e test_suite_name=test-foo-bar --tags shared,sssd
   pages:
     script:
       - mkdir .public
       - cp -r * .public
       - mv .public public
   artifacts:
     paths:
       - public

I have the above in .gitlab-ci.yml and when i run ci lint, it give error:

Error: jobs:test-foo-bar config contains unknown keys: pages

Any hints as to how to resolve the issue. our gitlab instance does support pages and has a lot of static html page already hosted.

The error is that the pages job is indented below the test-foo-bar one. It should be on its own line.

 test-foo-bar:
   before_script:
     - pwd
     - GIT_SSL_NO_VERIFY=true git clone https://192.168.122.1/foobar/myproj
     - cd myproj
     - ansible-playbook provision.yml -e test_suite_name=test-foo-bar
     - export ANSIBLE_HOST_KEY_CHECKING=False
     - chmod 0600 ssh_priv_key
  script:
    - ansible-playbook runtest.yml -e test_suite_name=test-foo-bar --tags shared,sssd

pages:
  script:
    - mkdir .public
    - cp -r * .public
    - mv .public public
  artifacts:
    paths:
      - public