Build Doxygen and publish to GitHub pages #208
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: Build Doxygen and publish to GitHub pages | |
on: | |
schedule: | |
- cron: "0 5 * * *" | |
workflow_dispatch: | |
jobs: | |
build-doxygen: | |
name: build_doxygen | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/dune-daq/nightly-release-alma9:development_v5" | |
env: | |
DEV_AREA_NAME: 'dev_area' | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout daq-release | |
uses: actions/checkout@v2 | |
with: | |
repository: DUNE-DAQ/daq-release | |
path: daq-release | |
- name: Create dbt area | |
run: | | |
source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh | |
setup_dbt latest_v5 | |
date_tag=$(date +%y%m%d) | |
release_name=NFD_DEV_${date_tag}_A9 | |
cd $GITHUB_WORKSPACE | |
dbt-create -n $release_name ${{ env.DEV_AREA_NAME }} | |
cd ${{ env.DEV_AREA_NAME }} | |
. env.sh | |
echo "DBT_AREA_ROOT=$(echo $DBT_AREA_ROOT)" >> $GITHUB_ENV | |
echo "DBT_AREA_ROOT is $DBT_AREA_ROOT" | |
- name: Checkout packages | |
run: | | |
cd $GITHUB_WORKSPACE/daq-release/scripts | |
./checkout-daq-package.py -i ../configs/coredaq/coredaq-develop/release.yaml -a -o $DBT_AREA_ROOT/sourcecode | |
./checkout-daq-package.py -i ../configs/fddaq/fddaq-develop/release.yaml -a -o $DBT_AREA_ROOT/sourcecode | |
# triggeralgs doesn't currently work with --codegen-only build; remove for now | |
rm -rf $DBT_AREA_ROOT/sourcecode/triggeralgs | |
- name: Build dbt area | |
run: | | |
cd $DBT_AREA_ROOT | |
. env.sh | |
spack load dbe || true | |
dbt-build --codegen-only | |
- name: Generate Doxyfile | |
run: | | |
# Reintroduce triggeralgs so Doxygen will see it | |
cd $DBT_AREA_ROOT/sourcecode | |
git clone https://github.com/DUNE-DAQ/triggeralgs.git -b develop | |
cd $GITHUB_WORKSPACE/daq-release/docs | |
./doxygen_gen.py | |
# Edit paths in Doxyfile so they can be seen by the Doxygen action container, which uses /github/workspace | |
sed -i "s|${DBT_AREA_ROOT}|/github/workspace/${{ env.DEV_AREA_NAME }}|g" Doxyfile | |
echo "Contents of Doxyfile INPUT:" | |
- name: Doxygen Action | |
uses: mattnotmitt/[email protected] | |
with: | |
working-directory: /github/workspace/daq-release/docs | |
doxyfile-path: './Doxyfile' | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./daq-release/docs/docs/html | |
enable_jekyll: false | |
allow_empty_commit: false | |
force_orphan: true | |
publish_branch: gh-pages | |