From 94b2f3f5adb0804c5f376cf6757aa71ec42583f8 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Sun, 2 Mar 2025 12:39:49 +0100 Subject: [PATCH 1/2] Modernize GitHub Actions workflow for docs. Prefer "official" actions over community provided ones. --- .github/workflows/gh-pages.yml | 85 +++++++++++++++++++++------------- README.md | 2 +- 2 files changed, 54 insertions(+), 33 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 101e7234..3d9c7d6c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,4 +1,4 @@ -name: gh-pages +name: Documentation on: push: @@ -10,43 +10,64 @@ on: - master - main -jobs: +permissions: + contents: read + pages: write + id-token: write - publish: +# Allow only one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true +jobs: + build: + name: Build Documentation runs-on: ubuntu-latest - defaults: run: shell: bash -l {0} steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: 'recursive' + fetch-depth: 0 + + - name: Setup Micromamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: doc/environment.yaml + environment-name: doc-build + cache-environment: true + cache-downloads: true + + - name: Build documentation with CMake + run: | + CMAKE_OPTIONS=( + -DHIGHFIVE_UNIT_TESTS=OFF + ) + cmake -B build -S . "${CMAKE_OPTIONS[@]}" + cmake --build build --target doc + cp -r doc/poster build/doc/html/ - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: doc/environment.yaml - environment-name: doc-build - - - name: Run doxygen - run: | - CMAKE_OPTIONS=( - -DHIGHFIVE_UNIT_TESTS=OFF - ) - cmake -B build -S . "${CMAKE_OPTIONS[@]}" - cmake --build build --target doc - cp -r doc/poster build/doc/html/ - - - name: Deploy to GitHub Pages - if: ${{ success() && github.ref == 'refs/heads/v2.x' && github.event_name == 'push' }} - uses: crazy-max/ghaction-github-pages@v2 - with: - target_branch: gh-pages - build_dir: build/doc/html - jekyll: false - keep_history: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifact + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + uses: actions/upload-pages-artifact@v3 + with: + path: build/doc/html + + deploy: + name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 0c042db6..3eb73432 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ https://github.com/BlueBrain/HighFive/issues/864 # HighFive - HDF5 header-only C++ Library -[![Doxygen -> gh-pages](https://github.com/highfive-devs/highfive/workflows/gh-pages/badge.svg?branch=master)](https://BlueBrain.github.io/HighFive/actions/workflows/gh-pages.yml?query=branch%3Amaster) +[![Doxygen -> gh-pages](https://github.com/highfive-devs/highfive/actions/workflows/gh-pages.yml/badge.svg?branch=main)](https://highfive-devs.github.io/highfive) [![codecov](https://codecov.io/gh/BlueBrain/HighFive/branch/master/graph/badge.svg?token=UBKxHEn7RS)](https://codecov.io/gh/BlueBrain/HighFive) [![Integration Tests](https://github.com/highfive-devs/bbp-integration/actions/workflows/integration.yml/badge.svg)](https://github.com/highfive-devs/bbp-integration/actions/workflows/integration.yml) [![Zenodo](https://zenodo.org/badge/47755262.svg)](https://zenodo.org/doi/10.5281/zenodo.10679422) From cadcc9c847fd1d1b35fa60a52db79e0d37e87a35 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Sun, 2 Mar 2025 20:49:13 +0100 Subject: [PATCH 2/2] fixup: update URLs in README.md --- CHANGELOG.md | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 088c590b..a42e4b00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ## Version 3.0.0-beta1 - 2024-07-16 This version is a major one and is breaking some usage compare to v2. -Read the migration guide from the documentation: https://bluebrain.github.io/HighFive/md__2home_2runner_2work_2_high_five_2_high_five_2doc_2migration__guide.html +Read the migration guide from the documentation: https://highfive-devs.github.io/highfive/md__2home_2runner_2work_2_high_five_2_high_five_2doc_2migration__guide.html The minimum version for C++ has been moved to `C++14`. diff --git a/README.md b/README.md index 3eb73432..32b30d28 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ https://github.com/BlueBrain/HighFive/issues/864 [![Integration Tests](https://github.com/highfive-devs/bbp-integration/actions/workflows/integration.yml/badge.svg)](https://github.com/highfive-devs/bbp-integration/actions/workflows/integration.yml) [![Zenodo](https://zenodo.org/badge/47755262.svg)](https://zenodo.org/doi/10.5281/zenodo.10679422) -Documentation: https://bluebrain.github.io/HighFive/ +Documentation: https://highfive-devs.github.io/highfive/ ## Brief @@ -56,7 +56,7 @@ It integrates nicely with other CMake projects by defining (and exporting) a Hig We use semantic versioning. Currently, we're preparing `v3` which contains a limited set of breaking changes required to eliminate undesireable behaviour or modernize outdated patterns. We provide a -[Migration Guide](https://bluebrain.github.io/HighFive/md__2home_2runner_2work_2_high_five_2_high_five_2doc_2migration__guide.html), +[Migration Guide](https://highfive-devs.github.io/highfive/md__2home_2runner_2work_2_high_five_2_high_five_2doc_2migration__guide.html), please report any missing or incorrect information to help others make the switch more easily.