Skip to content

Deploy Doxygen Docs #1533

Deploy Doxygen Docs

Deploy Doxygen Docs #1533

name: Build, Lint and Test
on:
pull_request: {}
workflow_dispatch:
inputs:
runner:
description: Which runner to use
type: choice
default: 'ubuntu-22.04'
required: true
options:
- 'ubuntu-22.04'
- 'large-ubuntu-22.04-xxl'
schedule:
- cron: '37 13,1 * * *'
jobs:
ci:
name: Build, Lint and Test
uses: everest/everest-ci/.github/workflows/continuous_integration.yml@feature/add-doxygen
permissions:
contents: read
secrets:
coverage_deploy_token: ${{ secrets.SA_GITHUB_PAT }}
with:
runner: ${{ inputs.runner || 'ubuntu-22.04' }}
artifact_deploy_target_repo: EVerest/everest.github.io
run_coverage: true
do_not_run_coverage_badge_creation: false
run_install_wheels: false
run_integration_tests: false
ctest_report_path: ctest-report
coverage_report_path: gcovr-coverage
coverage_xml_path: gcovr-coverage-xml.xml
build_docs:
name: Build Doxygen Documentation
needs:
- ci
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }}
steps:
- name: Checkout
uses: actions/[email protected]
with:
path: source
- name: Setup run scripts
run: |
mkdir scripts
rsync -a source/.ci/build-kit/scripts/ scripts
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.BUILD_KIT_IMAGE_NAME }}
- name: Set output tag
id: buildkit_tag
shell: python3 {0}
run: |
import os
tags = "${{ steps.meta.outputs.tags }}".split(",")
if len(tags) == 0:
print("No tags found!❌")
exit(1)
tag = f"local/build-kit-libocpp:{tags[0]}"
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"tag={tag}\n")
print(f"Set tag={tag}")
- name: Download build-kit image
uses: actions/download-artifact@v4
with:
name: build-kit
- name: Load build-kit image
run: |
docker load -i build-kit.tar
docker image tag ${{ steps.buildkit_tag.outputs.tag }} build-kit
- name: Build Doxygen Documentation
run: |
docker run \
--volume "${{ github.workspace }}:/ext" \
--name build-doc-container \
build-kit run-script build_docs
- name: Upload Doxygen Documentation
uses: actions/[email protected]
with:
if-no-files-found: error
name: doxygen-docs
path: doxygen-docs
deploy_docs:
name: Deploy Doxygen Documentation
needs:
- ci
- build_docs
runs-on: ${{ inputs.runner || 'ubuntu-22.04' }}
steps:
- name: Checkout local github actions
uses: actions/checkout@v4
with:
repository: everest/everest-ci
ref: ${{ needs.ci.outputs.sha_everest_ci }} #LTODO
path: everest-ci
- name: Checkout
uses: actions/[email protected]
with:
path: source
- name: Download doxygen-docs artifact
uses: actions/[email protected]
with:
name: doxygen-docs
- name: Deploy doxygen docs
id: deploy_doxygen_docs
uses: ./everest-ci/github-actions/deploy-doxygen-docs
with:
target_repo: EVerest/everest.github.io
github_token : ${{ secrets.SA_GITHUB_PAT }}
docs_directory: doxygen-docs
- name: Write summary
run: |
echo "Doxygen documentation deployed successfully!🚀" >> $GITHUB_STEP_SUMMARY
echo "You can access the documentation at: https://everest.github.io/${{ steps.deploy_doxygen_docs.outputs.deployed_path}}" >> $GITHUB_STEP_SUMMARY