wxWidgets/.github/workflows/docs_update.yml
Vadim Zeitlin 4179d13dab Fail the documentation build if there are any Doxygen warnings
Check for Doxygen warnings, that are, for the most part, actually
errors, to ensure that they don't creep back in after they were recently
fixed.
2022-03-28 11:16:53 +02:00

53 lines
1.9 KiB
YAML

name: Update Documentation
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-20.04
name: Update Online Documentation
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install doxygen
run: |
sudo apt-get -q -o=Dpkg::Use-Pty=0 -y install doxygen graphviz
- name: Customize for online docs
working-directory: docs/doxygen
run: |
sed -i'' -e "s@<!--EXTRA FOOTER SCRIPT-->@<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-794025-2', 'auto');ga('send', 'pageview');</script>@" \
custom_footer.html
- name: Generate documentation
working-directory: docs/doxygen
run: |
./regen.sh php
if [[ -s doxygen.log ]]; then
echo '*** There were warnings during docs generation: ***'
echo '-----------------------------------------------------------'
cat doxygen.log
echo '-----------------------------------------------------------'
exit 1
fi
- name: Upload
if: github.ref == 'refs/heads/master'
working-directory: docs/doxygen
env:
DOCS_WEBSITE_KEY: ${{secrets.DOCS_WEBSITE_KEY}}
DOCS_WEBSITE_SSH_CONFIG: ${{secrets.DOCS_WEBSITE_SSH_CONFIG}}
run: |
mkdir "$HOME/.ssh"
echo "$DOCS_WEBSITE_KEY" > "$HOME/.ssh/docs_website_key"
chmod 600 "$HOME/.ssh/docs_website_key"
echo "$DOCS_WEBSITE_SSH_CONFIG" > "$HOME/.ssh/config"
rsync --checksum --compress --delete --recursive --verbose out/html/ wxdocs:public_html/latest/