Skip to content

[ci] Reorganize artifact names and sort in nightly release #2332

[ci] Reorganize artifact names and sort in nightly release

[ci] Reorganize artifact names and sort in nightly release #2332

name: Build Documentation
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
# Cancel CI workflows which are still running from previous pushes
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build_documentation:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Update environment
run: |
sudo apt update -qq
sudo apt install -y cmake doxygen git python3 python3-pip python3-venv wget zip
- name: Checkout
uses: actions/checkout@v3
- name: Set build date
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
BUILD_DATE=$(date +'%Y-%b-%d_%H-%M-%S')
BUILD_VERSION="${SHORT_SHA}_${BUILD_DATE}"
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV
- name: Configure CMake
working-directory: ${{ github.workspace }}/documentation
run: |
cmake . -Bbuild
- name: Build
working-directory: ${{ github.workspace }}/documentation
run: |
cmake --build build
- name: Linkcheck
working-directory: ${{ github.workspace }}/documentation
# TODO: return true as long GitHub does not allow specific steps to fail
run: |
cmake --build build --target inexor-vulkan-renderer-documentation-linkcheck || true
- name: Prepare artifacts
working-directory: ${{ github.workspace }}/documentation
run: |
ZIP_NAME=Nightly_Documentation_${BUILD_VERSION}.zip
zip -r "$ZIP_NAME" build/html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Nightly_Documentation_${{ env.BUILD_VERSION}}
path: ${{ github.workspace }}/documentation/Nightly_Documentation_${{ env.BUILD_VERSION}}.zip
retention-days: 60