diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-02-20 08:05:26 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-20 13:50:07 +0100 |
| commit | 1998279dc26d6bf45d573be96a2a97e44ce2c839 (patch) | |
| tree | 856b2b6267b261354ccb111688a41e1b34af7e40 | |
| parent | c21962b5abc48bfeb94cb5d1d30adf86919f67cd (diff) | |
| download | vis-1998279dc26d6bf45d573be96a2a97e44ce2c839.tar.gz vis-1998279dc26d6bf45d573be96a2a97e44ce2c839.tar.xz | |
ci: add man page generation
| -rw-r--r-- | .github/workflows/man.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/man.yml b/.github/workflows/man.yml new file mode 100644 index 0000000..fde8c36 --- /dev/null +++ b/.github/workflows/man.yml @@ -0,0 +1,38 @@ +name: Manual + +on: + push: + paths: + - 'man/**' + +jobs: + man: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Dependency + run: sudo apt install mandoc + + - name: Manual generation + run: | + make man + wget 'https://cvsweb.bsd.lv/~checkout~/mandoc/mandoc.css?rev=1.46&content-type=text/plain' -O man/mandoc.css + ln -sf "${GITHUB_REPOSITORY#$GITHUB_ACTOR/}.1.html" man/index.html + + - name: Upload + env: + DEPLOY_TOKEN: ${{ secrets.GITHUB_DEPLOY_TOKEN }} + run: | + git clone --depth=1 --single-branch --branch gh-pages "https://x-access-token:${DEPLOY_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" /tmp/gh-pages + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + mkdir -p /tmp/gh-pages/man + rm -f /tmp/gh-pages/man/* + cp -av man/*.html /tmp/gh-pages/man/ + cp -av man/*.css /tmp/gh-pages/man/ + cd /tmp/gh-pages + git add -A && git commit --allow-empty -am "Publishing from ${GITHUB_REPOSITORY} ${GITHUB_SHA}" + git push origin gh-pages |
