ExtraStatic: powerful and easy publishing

Skip to content
Snippets Groups Projects
Forked from svekyll / svekyll
80 commits behind, 20 commits ahead of the upstream repository.
svekyll-pages-gitlab-ci.yml 775 B
default:
  image: registry.extrastatic.com/svekyll:latest

tests:
  only:
    variables:
      - $SVEKYLL_TESTS
  script:
    - npm install
    - yarn test

pages:
  only:
    - main
  script:
    - if [ -n "$SVEKYLL_GENESIS" ]; then echo 'This is genesis, exiting'; exit 1; fi
    - npm install
    - yarn build
    - rm -rf public
    - mv build public
  artifacts:
    paths:
      - public

preview:
  except:
    - main
  only:
    variables:
      - $BRANCH_PREVIEW_KEY
  retry: 2
  script:
    - yarn install
    - yarn build
    - apt update 
    - apt install -y zip curl
    - cd build
    - URL="https://uploads.x.extrastatic.io/upload/$CI_PROJECT_NAME/$CI_COMMIT_REF_NAME"
    - echo $URL
    - zip -r app.zip .
    - SVEKYLL_CLI=1 node ../utils/index.js upload