Reputation: 497
There are several options for setting up Gitlab pages. Most of them have a lot of awesome tools. But it is not really necessary for us. That's why we wondered if it was possible to convert a .MD
(readme.md) file to a single Gitlab page. So we can write in .MD
markup.
Upvotes: 2
Views: 1665
Reputation: 497
I have written a script which converts the md file to html and then uploads it on a host.
image: node:4.2.2
variables:
HOST: "myhost"
USERNAME: "myusername"
PASSWORD: "mypassword"
pages:
stage: deploy
script:
- npm install -g markdown-styles -y
- generate-md --input ./ --output ./output --layout mixu-bootstrap-2col
- cd output
- pwd
- ls
- apt-get update -qq && apt-get install -y -qq lftp
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./ ./www -e --delete-first --parallel=10 --exclude-glob .git* --exclude .sh --exclude .gitlab-ci.yml --exclude /node_modules/*"
only:
- master
Upvotes: 1