From e5582a2d54aa59a4ea8c0982998c27d559c821d8 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Thu, 2 Jun 2022 17:26:03 +0200 Subject: [PATCH] ci: deploy man pages to website --- .woodpecker/.man.yml | 36 ++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 37 insertions(+) create mode 100644 .woodpecker/.man.yml diff --git a/.woodpecker/.man.yml b/.woodpecker/.man.yml new file mode 100644 index 0000000..0b80886 --- /dev/null +++ b/.woodpecker/.man.yml @@ -0,0 +1,36 @@ +platform: 'linux/amd64' +branches: + exclude: [ main ] + +depends_on: + - build + +skip_clone: true + +pipeline: + generate: + image: 'chewingbever/vlang:latest' + 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f1ef5..93e566a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * CLI flags to take advantage of above API improvements * Added CLI command to generate all man pages * PKGBUILDs now install man pages +* CLI man pages are now hosted on https://rustybever.be ### Changed