.gitlab-ci.yml 1.29 KB
Newer Older
1 2
stages:
  - build-org
Guilherme Henrique's avatar
Guilherme Henrique committed
3
  - filter-css-classes
4
  - publish
Guilherme Henrique's avatar
Guilherme Henrique committed
5

6 7 8 9 10 11
org-generation:
  image:
    name: iquiw/alpine-emacs
  before_script:
    - apk update
    - apk add graphviz
12
    - apk add ttf-freefont
13 14
    # If cache succeeded, copy to emacs home
    - if [ -d elpa ]; then cp -rf elpa /root/.emacs.d; fi
15
  cache:
16
    key: org-files
17 18
    paths:
      - .timestamps
19 20 21 22
      - elpa/
  artifacts:
    paths:
      - _posts
23
      - res
24
  script:
Guilherme Henrique's avatar
Guilherme Henrique committed
25
    - emacs -batch -q -l export.el -f org-publish-with-different-timestamp-directory
26 27 28 29 30 31 32 33 34
    # Copy elpa packages to current directory for cache
    - cp -rf /root/.emacs.d/elpa/ .
  stage: build-org

css-theme:
  image: node:6.11.3-alpine
  cache:
    key: node-libraries
    paths:
35
      - .npm_cache/
Guilherme Henrique's avatar
Guilherme Henrique committed
36
  before_script:
37
    - npm config set cache $(pwd)/.npm_cache
38
    - cd syntax-extractor && npm install && cd ..
Guilherme Henrique's avatar
Guilherme Henrique committed
39
  script:
40
    - node syntax-extractor/index.js darktooth
41 42 43
  artifacts:
    paths:
      - _assets/css/syntax.scss
Guilherme Henrique's avatar
Guilherme Henrique committed
44
  stage: filter-css-classes
45 46 47 48 49 50 51 52 53 54 55 56

pages:
  image: ruby:2.4-alpine3.6
  cache:
    key: jekyll
    paths:
      - .bundle_cache/
  before_script:
    - apk update
    - apk add build-base
    - bundle install --path .bundle_cache/
  script:
57
    - JEKYLL_ENV=production jekyll build -d public
Guilherme Henrique's avatar
Guilherme Henrique committed
58 59 60
  artifacts:
    paths:
      - public
61
  stage: publish
Guilherme Henrique's avatar
Guilherme Henrique committed
62 63
  only:
    - master