Generate Doxygen documentation #283
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: Generate Doxygen documentation | |
on: | |
schedule: | |
- cron: 0 1 * * * | |
pull_request: | |
branches: | |
- sycl | |
paths: | |
- '.github/workflows/sycl-docs.yml' | |
- 'clang/docs/**' | |
- 'sycl/doc/**' | |
permissions: read-all | |
jobs: | |
build: | |
permissions: | |
contents: write # for Git to git push | |
runs-on: ubuntu-latest | |
if: github.repository == 'intel/llvm' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: repo | |
- name: Install deps | |
run: | | |
sudo apt-get install -y doxygen graphviz ssh ninja-build libhwloc-dev | |
sudo pip3 install -r repo/llvm/docs/requirements.txt | |
- name: Build Docs | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/build | |
cd $GITHUB_WORKSPACE/build | |
python $GITHUB_WORKSPACE/repo/buildbot/configure.py -w $GITHUB_WORKSPACE \ | |
-s $GITHUB_WORKSPACE/repo -o $GITHUB_WORKSPACE/build -t Release --docs | |
cmake --build . --target doxygen-sycl | |
cmake --build . --target doxygen-clang | |
cmake --build . --target docs-sycl-html | |
cmake --build . --target docs-clang-html | |
- name: Deploy | |
if: ${{ github.event_name == 'schedule' }} | |
env: | |
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}} | |
run: | | |
mkdir -p ~/.ssh | |
echo "$SSH_KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
eval "$(ssh-agent -s)" | |
ssh-add -k ~/.ssh/id_rsa | |
git clone [email protected]:intel/llvm-docs.git docs | |
cd $GITHUB_WORKSPACE/docs | |
git rm -rf . | |
touch .nojekyll | |
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* . | |
mv $GITHUB_WORKSPACE/build/tools/sycl/doc/doxygen/html doxygen/ | |
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html clang/ | |
mv $GITHUB_WORKSPACE/build/tools/clang/docs/doxygen/html clang_doxygen/ | |
git config --global user.name "iclsrc" | |
git config --global user.email "[email protected]" | |
git add . | |
git diff-index --quiet HEAD || git commit --amend -m "Update docs" -s | |
git push -f |