mirror of
https://github.com/nlohmann/json.git
synced 2026-11-02 10:55:35 +00:00
GitHub is moving the ubuntu-latest label from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (actions/runner-images#14748). Pin every ubuntu-latest job to ubuntu-26.04 so the switch does not change the toolchain under our jobs, and so the behaviour does not depend on when GitHub reaches our runs. Jobs pinned to ubuntu-24.04 and ubuntu-24.04-arm are unchanged. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: Publish documentation
|
|
|
|
# publish the documentation on every merge to develop branch
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
paths:
|
|
- docs/mkdocs/**
|
|
# the site also embeds these files via pymdownx.snippets
|
|
# (mkdocs.yml sets restrict_base_path: false for this)
|
|
- .clang-tidy
|
|
- .github/CODE_OF_CONDUCT.md
|
|
- .github/CONTRIBUTING.md
|
|
- .github/SECURITY.md
|
|
- cmake/clang_flags.cmake
|
|
- cmake/gcc_flags.cmake
|
|
- include/nlohmann/detail/abi_macros.hpp
|
|
- tests/fmt_formatter/project/main.cpp
|
|
- tools/astyle/.astylerc
|
|
workflow_dispatch:
|
|
|
|
# we don't want to have concurrent jobs, and we don't want to cancel running jobs to avoid broken publications
|
|
concurrency:
|
|
group: documentation
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish_documentation:
|
|
permissions:
|
|
contents: write
|
|
|
|
if: github.repository == 'nlohmann/json'
|
|
runs-on: ubuntu-26.04
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
# the git-revision-date-localized plugin needs the history for correct "last update" dates and so the
|
|
# strict build does not fail on a shallow clone
|
|
fetch-depth: 0
|
|
|
|
- name: Install virtual environment
|
|
run: make install_venv -C docs/mkdocs
|
|
|
|
- name: Build documentation
|
|
run: make build -C docs/mkdocs
|
|
|
|
- name: Deploy documentation
|
|
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs/mkdocs/site
|