Merge branch 'docs-workflow'

Fix the documentation update GitHub Action workflow.
This commit is contained in:
Vadim Zeitlin
2022-03-28 11:25:28 +02:00
2 changed files with 18 additions and 4 deletions

View File

@@ -20,13 +20,26 @@ jobs:
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.repository_owner == 'wxWidgets'
if: github.ref == 'refs/heads/master'
working-directory: docs/doxygen
env:
DOCS_WEBSITE_KEY: ${{secrets.DOCS_WEBSITE_KEY}}
@@ -36,5 +49,4 @@ jobs:
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/
rsync --checksum --compress --delete --recursive --verbose out/html/ wxdocs:public_html/latest/

View File

@@ -19,6 +19,8 @@
<script src="wxwidgets.js" type="text/javascript"></script>
<!--EXTRA FOOTER SCRIPT-->
</div><!-- #page_container -->
</body>
</html>
</html>