Documentation #42
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: Documentation | |
on: | |
# Run on the 2nd of every month, at 10AM UTC | |
schedule: | |
- cron: '0 10 2 * *' | |
# Run the workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
document: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone code repository | |
uses: actions/checkout@v2 | |
with: | |
path: rendu | |
persist-credentials: false | |
- name: Build documentation | |
working-directory: ${{github.workspace}}/rendu | |
run: | | |
sudo apt-get update -y && sudo apt-get install -yq libclang1-9 libclang-cpp9 | |
wget -O doxygen.tar.gz https://doxygen.nl/files/doxygen-1.9.5.linux.bin.tar.gz | |
mkdir doxygen && tar -xf doxygen.tar.gz -C doxygen --strip-components=1 | |
doxygen/bin/doxygen docs/Doxyfile | |
- name: Clone documentation repository | |
uses: actions/checkout@v2 | |
with: | |
repository: kosua20/Rendu-documentation | |
path: doc | |
persist-credentials: true | |
token: ${{ secrets.DOC_TOKEN }} | |
- name: Upload documentation | |
working-directory: ${{github.workspace}}/doc | |
run: | | |
git config user.name "Simon Rodriguez" | |
git config user.email [email protected] | |
git rm -rf . | |
cp -r ../rendu/docs/html/* ./ | |
git add . | |
git diff-index --quiet HEAD || git commit -a -m "Documentation: update (via CI)." | |
git push |