image: node:16.16-alpine3.15 stages: - test - deploy test: stage: test script: - cd docusaurus-site - yarn install - yarn build - mv ./build ../test artifacts: paths: - test rules: - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH pages: stage: deploy script: - cd docusaurus-site - yarn install - yarn build - mv ./build ../public artifacts: paths: - public rules: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH