1
0
Fork 0
forked from lthn/blockchain

Add documentation build steps to CI workflows

Introduces a reusable GitHub Action for building documentation and updates all platform build workflows to install documentation dependencies and run 'make docs'. This ensures documentation is built and available as part of the CI process across Linux, macOS, and Windows. Also updates the docs workflow to adjust pip dependencies.
This commit is contained in:
Snider 2025-10-01 21:10:21 +01:00
parent c70b383ce6
commit 235b0cb41b
7 changed files with 84 additions and 2 deletions

37
.github/actions/make-docs/action.yml vendored Normal file
View file

@ -0,0 +1,37 @@
# .github/actions/upload-artifacts/action.yml
name: 'Build Documentation'
description: 'Archives and uploads signed binaries to a GitHub release'
#inputs:
# chain-network:
# required: true
# description: 'The chain network name to use in filenames, mainnet or testnet'
# assets:
# description: "A EOL separated string list of filenames to archive; if asset is a abs path, it's respected"
# required: false
# asset-type:
# required: true
# description: 'The asset type: cli, gui, ANYTHING; used as a separator for different release packages for the same arch'
# asset-directory:
# required: true
# description: "The directory where 7z's working dir will be set"
runs:
using: "composite"
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: ~/.cache
restore-keys: |
mkdocs-material-
- if: runner.os == 'linux'
run: |
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
- run: pip install mkdocs-git-revision-date-localized-plugin cairosvg mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin mkdocs-material[imaging]

View file

@ -27,8 +27,9 @@ jobs:
with:
key: ${{ github.ref }}
path: .cache
- run: sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
- run: pip install mkdocs-git-revision-date-localized-plugin cairosvg mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin mkdocs-material[imaging]
- run: pip install mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin mkdocs-material[imaging]
- name: Build Offline Version
run: make docs

View file

@ -22,7 +22,7 @@ jobs:
submodules: recursive
- name: install dependencies
run: sudo apt-get install -y autotools-dev git build-essential
run: sudo apt-get install -y autotools-dev git build-essential libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
- name: Cache SDK Folder
uses: actions/cache@v4
@ -30,12 +30,22 @@ jobs:
path: ${{ github.workspace }}/build/sdk
key: ${{ runner.os }}-${{ runner.arch }}-sdk
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Install Conan
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -30,12 +30,20 @@ jobs:
path: ${{ github.workspace }}/build/sdk
key: ${{ runner.os }}-${{ runner.arch }}-sdk
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Install Conan
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -29,12 +29,22 @@ jobs:
path: ${{ github.workspace }}/build/sdk
key: ${{ runner.os }}-${{ runner.arch }}-sdk
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: brew install cairo freetype libffi libjpeg libpng zlib pngquant
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Install Conan
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
# - name: Compile Release
# run: make apple-clang-armv8 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -28,12 +28,20 @@ jobs:
path: ${{ github.workspace }}/build/sdk
key: ${{ runner.os }}-${{ runner.arch }}-sdk
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Install Conan
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -27,12 +27,20 @@ jobs:
path: ${{ github.workspace }}/build/sdk
key: ${{ runner.os }}-${{ runner.arch }}-sdk
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Install Conan
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}