vieter/.woodpecker/man.yml

46 lines
1.2 KiB
YAML
Raw Normal View History

2022-09-15 13:42:49 +02:00
variables:
- &vlang_image 'git.rustybever.be/vieter/vlang:5d4c9dc9fc11bf8648541c934adb64f27cb94e37-alpine3.17'
2022-09-15 13:42:49 +02:00
2022-06-02 17:26:03 +02:00
platform: 'linux/amd64'
branches:
exclude: [ main ]
depends_on:
- build
pipeline:
install-modules:
2022-09-15 13:42:49 +02:00
image: *vlang_image
2022-06-02 17:26:03 +02:00
pull: true
commands:
- export VMODULES=$PWD/.vmodules
- 'cd src && v install'
generate:
image: *vlang_image
commands:
# - curl -o vieter -L "https://s3.rustybever.be/vieter/commits/$CI_COMMIT_SHA/vieter-linux-amd64"
# - chmod +x vieter
- export VMODULES=$PWD/.vmodules
- make
2022-06-02 17:26:03 +02:00
- ./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