Skip to content
Snippets Groups Projects
.gitlab-ci.yml 998 B
Newer Older
image: node:18.20.0
  cache:
    - key:
        files:
          - yarn.lock
      paths:
        - .yarn-cache/
  before_script:
    - echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
    - echo 'yarn-offline-mirror-pruning true' >> .yarnrc
    - yarn install --frozen-lockfile
    - yarn build
  rules:
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH

pages:
  stage: build
  cache:
    - key:
        files:
          - yarn.lock
      paths:
        - .yarn-cache/
  before_script:
    - echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
    - echo 'yarn-offline-mirror-pruning true' >> .yarnrc
    - yarn install --frozen-lockfile
    - yarn build
    - mv dist public
    #- cp -a dist/. public/ #original
    #- echo '/* /index.html 200' > public/_redirects #original
    #- mv dist public  #Ensure the output directory is renamed to public
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH