mirror of
https://github.com/boostorg/leaf.git
synced 2026-01-19 04:22:08 +00:00
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- feature/gha_fixes
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install packages
|
|
run: |
|
|
sudo gem install asciidoctor asciidoctor-pdf rouge
|
|
|
|
- name: Setup Boost
|
|
run: |
|
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
|
cd ..
|
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
|
cd boost-root
|
|
cp -r $GITHUB_WORKSPACE/* libs/leaf
|
|
git submodule update --init tools/build
|
|
git submodule update --init tools/boost_install
|
|
git submodule update --init libs/config
|
|
./bootstrap.sh
|
|
|
|
- name: Create user-config.jam
|
|
run: |
|
|
echo "using asciidoctor ;" > ~/user-config.jam
|
|
|
|
- name: Build documentation
|
|
run: |
|
|
cd ../boost-root/libs/leaf/doc
|
|
../../../b2
|
|
|
|
- name: Generate single header
|
|
run: |
|
|
REF=$(git show-ref $GITHUB_REF --hash)
|
|
cd ../boost-root/libs/leaf
|
|
python scripts/generate_single_header.py -i include/boost/leaf/detail/all.hpp -p include -o doc/html/leaf.hpp boost/leaf --hash "$REF"
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: JamesIves/github-pages-deploy-action@4.0.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: gh-pages
|
|
folder: ../boost-root/libs/leaf/doc/html
|