forked from vieter-v/vieter
40 lines
1011 B
YAML
40 lines
1011 B
YAML
variables:
|
|
- &vlang_image 'git.rustybever.be/chewing_bever/vlang:0.3.2'
|
|
|
|
platform: 'linux/amd64'
|
|
branches:
|
|
exclude: [ main ]
|
|
|
|
depends_on:
|
|
- build
|
|
|
|
skip_clone: true
|
|
|
|
pipeline:
|
|
generate:
|
|
image: *vlang_image
|
|
pull: true
|
|
commands:
|
|
- curl -o vieter -L "https://s3.rustybever.be/vieter/commits/$CI_COMMIT_SHA/vieter-linux-amd64"
|
|
- chmod +x vieter
|
|
- ./vieter man man
|
|
- cd man
|
|
|
|
# Generate an HTML page from each man page
|
|
- for f in $(ls -1 *.1); do mandoc -Thtml -O style=mandoc.css,man=%N.%S.html $f > "$f.html"; done
|
|
|
|
# Download the mandoc.css file from the official site
|
|
- curl -o mandoc.css -L https://mandoc.bsd.lv/mandoc.css
|
|
|
|
- tar czvf ../man.tar.gz *.html mandoc.css
|
|
|
|
deploy:
|
|
image: 'curlimages/curl'
|
|
secrets:
|
|
- 'site_api_key'
|
|
commands:
|
|
- 'curl -XPOST --fail -s -H "Authorization: Bearer $SITE_API_KEY" -T man.tar.gz https://rustybever.be/api/deploy?dir=man-vieter'
|
|
when:
|
|
event: push
|
|
branch: dev
|