build_documentation #449
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- 'master' | |
repository_dispatch: | |
types: [build_documentation] | |
workflow_dispatch: | |
jobs: | |
docs: | |
name: "Publish" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y xsltproc doxygen doxygen-doc texlive texlive-font-utils texlive-latex-extra ghostscript graphviz | |
- name: Configure Git | |
run: | | |
git config --global push.default upstream | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
- name: Get Robotology Repositories | |
run: | | |
git clone --depth 1 --single-branch --branch master https://github.com/robotology/yarp.git | |
git clone --depth 1 --single-branch --branch devel https://github.com/robotology/icub-main.git | |
git clone --depth 1 --single-branch --branch master https://github.com/robotology/icub-tutorials.git | |
- name: Parse XML Files | |
run: | | |
mkdir generated-from-xml | |
list=`find icub-main/src icub-tutorials/src -iname *.xml | xargs` | |
for i in ${list} | |
do | |
filename=`basename ${i}` | |
doxyfile=${filename%%.*} | |
xsltproc --output generated-from-xml/${doxyfile}.dox yarp/scripts/yarp-module.xsl ${i} | |
done | |
- name: Build Documentation | |
run: | | |
doxygen icub-main/conf/Doxyfile-main-tutorials.txt | |
- name: Prepare gh-pages anew | |
run: | | |
git checkout --orphan gh-pages | |
rm -R `ls -A | grep -v -E "^(.git|doc|index.html)$"` | |
git add . | |
git commit -m "publish site" | |
git push --force --set-upstream origin gh-pages | |