2019-08-21 05:42:47 +00:00
|
|
|
dist: bionic
|
2019-09-11 15:47:32 +00:00
|
|
|
language: generic
|
2019-08-21 05:42:47 +00:00
|
|
|
|
2019-09-11 15:47:32 +00:00
|
|
|
# Assuming that the GitHub API is at version 4.0
|
|
|
|
# disable the default submodule logic
|
|
|
|
git:
|
|
|
|
submodules: false
|
|
|
|
|
|
|
|
# use sed to replace the SSH URL with the public URL, then init and update submodules
|
2019-08-21 05:42:47 +00:00
|
|
|
before_install:
|
2019-09-11 15:47:32 +00:00
|
|
|
- sed -i 's/git@github.com:/git:\/\/github.com\//' .gitmodules
|
|
|
|
- git submodule update --init --recursive
|
2019-08-21 05:42:47 +00:00
|
|
|
- sudo apt-get update
|
2019-09-11 15:47:32 +00:00
|
|
|
- sudo apt-get install python3
|
|
|
|
- sudo apt-get install ruby wget
|
|
|
|
- curl https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "hugo_extended.*deb" | grep "browser_download_url" | cut --delimiter=":" --delimiter="\"" --fields=4 | sudo wget -i -
|
|
|
|
- sudo dpkg -i *.deb
|
2019-08-26 03:56:44 +00:00
|
|
|
- sudo gem install asciidoctor
|
2019-08-21 05:42:47 +00:00
|
|
|
script:
|
|
|
|
- asciidoctor --version
|
2019-09-11 15:47:32 +00:00
|
|
|
- hugo
|
2019-08-21 05:42:47 +00:00
|
|
|
deploy:
|
2019-09-11 15:47:32 +00:00
|
|
|
local_dir: "./public/"
|
2019-08-21 05:42:47 +00:00
|
|
|
provider: pages
|
|
|
|
skip_cleanup: true
|
2019-09-11 15:47:32 +00:00
|
|
|
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
|
2019-08-21 05:42:47 +00:00
|
|
|
target_branch: gh-pages
|
|
|
|
on:
|
|
|
|
branch: master
|
2019-09-11 15:47:32 +00:00
|
|
|
|