-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
64 lines (58 loc) · 1.86 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
image: node
before_script:
- npm i markdown-spellcheck -g --silent
cache:
paths:
- /usr/local/lib/node_modules
- /usr/local/bin
- ~/diatex
variables:
DIATEX_CDN_REPO: benjamincaldwell/gitcdn
DIATEX_IMAGE_BASE_PATH: "http://gitcdn.bcaldwell.ca"
DIATEX_URL: "https://diatex.bcaldwell.ca"
spell_check:
before_script:
- npm i markdown-spellcheck -g --silent
script:
- mdspell --en-us -n -r -a "**/*.md" "!**/jekyll/**/*.md"
only:
- master
allow_failure: true
gh_pages:
image: ruby:2.4
before_script:
- export LC_ALL=C.UTF-8
- export LANG=en_US.UTF-8
- export LANGUAGE=en_US.UTF-8
- gem install htmlbeautifier
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "${GITLAB_CI_WRITE_KEY}")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo "${SSH_SERVER_HOSTKEYS}" > ~/.ssh/known_hosts'
- '[ -d "~/diatex" ] && cd ~/diatex && git reset --hard origin/master'
- '[ ! -d "~/diatex" ] && git clone https://github.com/benjamincaldwell/diatex.git ~/diatex'
script:
- git fetch
- git config --global user.email "[email protected]" && git config --global user.name "Benjamin Bot"
# Run diatex
# - ruby ~/diatex/diatex .
# - git status
# - git add --all .
# - git commit -m "Convert latex and diagram for '$(git log -1 --pretty=%B)' [ci skip]" || true
# - git push origin master || true
# Publish the Github Pages Site
- mv jekyll/* .
- rm -rf jekyll
- ruby ./bin/toc.rb
- ruby ./bin/format_page.rb
- git status
- git add --all .
- git commit -m 'Build jekyll site'
- git remote add gitlab [email protected]:benjamin/continuous-learning.git || true
- git push gitlab HEAD:gh-pages -f
only:
- master
environment:
name: github pages
url: https://cl.bcaldwell.ca