Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (43 sloc) 1.94 KB
language: python
python: 3.5
sudo: true
git:
depth: 9999999
branches:
only:
- master
env:
global:
- BLOG_HOST=blog.hongminhee.org
- BLOG_BUILD_DIR=/tmp/blog-out
- secure: "rQDdiVJJ9L4kCPvvNNzP8GsDX3ioJdQT8QH1k7jTJvFJqP+w2gKuiNvFZQaYDv8Y6kTgLlEw5hQt/P6b9A9g8pPn5UVB4r71Ga6yIxFYBDc6uSk+Bnf+KMf8iW2zkaGOyxiDpxkM/rByQRaYeWyK5JRY9FG4PyrCcE8FWrl/C4xRxhhG74cS/Qgcd3Y3hkm0ECi1vJTGUyhFdzcc4r9Im3tSwR48Uwuf4ZgVFjK7sff6nP3dpUEhVvcWwDPGExWcx5Syp+L1pQ04qyKR2GZ3CouhPgFA8GmBieCH1XrIU9cK+vfebNo20+3HOmqRXDJpZrczGArdlMf7dgXqz58JEs/FRy/3l+XQGioyDjXD58gpgvt0sPOM42z40pXa6D2/nxv1KVUg57MrVG3O+Rr0FJSlV/3fqZK/QZCrj7cC/jGE4064cNt+tTRc8F9irVPr4AMl049iVesO65R0ZhOOJ4F9wDwJpuGo3U4VkY/JZaiJmiEQC49yR4Zb8pfWGMzc5s8PnKS9o3lJQ3I1h71QLh+84ZMMhA/tHjyECr7RkqDHmWzTrKKfb+DyX8ACV+d0pluZb8KpZ+nLORCi5FzTXnoQpaWsiYjI/6KE2hG3VU/Eu8YgXxdIXnuAc/tS2waruG3Nc5UFXsgQlmRYAw5PVIns27pz49bypGzq4YkExm8="
cache:
- apt
- pip
before_install:
- sudo add-apt-repository -y ppa:git-core/ppa
- sudo apt-get update -q
- sudo apt-get install -y git
- git --version
- wget https://github.com/jgm/pandoc/releases/download/1.17.0.2/pandoc-1.17.0.2-1-amd64.deb
- sudo dpkg -i pandoc-1.17.0.2-1-amd64.deb
- pandoc --version
- pandoc --help
install:
- pip install -r requirements.txt
script:
- ./gen.py --base-url="https://$BLOG_HOST/" --outdate-years=5 "$BLOG_BUILD_DIR" 2*/**/*.md 2*/**/*.alias
after_success:
- git log -n1 --format="format:%s%n%n$TRAVIS_COMMIT_RANGE" > /tmp/blog-commit
- git log -n1 --format="format:%an" > /tmp/blog-author
- git log -n1 --format="format:%ae" > /tmp/blog-author-email
- touch "$BLOG_BUILD_DIR/.nojekyll"
- echo -n "$BLOG_HOST" > "$BLOG_BUILD_DIR/CNAME"
- git init "$BLOG_BUILD_DIR"
- pushd "$BLOG_BUILD_DIR" &&
git checkout -b gh-pages &&
git add . &&
git config user.name "`cat /tmp/blog-author`" &&
git config user.email "`cat /tmp/blog-author-email`" &&
git commit -a -F /tmp/blog-commit &&
git push -f "https://$GITHUB_AUTH:x-oauth-basic@github.com/dahlia/blog.git" gh-pages