Merge pull request #20 from microsoft/fix_path_serialised_size #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
push: | |
branches: | |
- main | |
- 'releases/**' | |
tags: | |
- 'merklecpp-*' | |
- 'v*' | |
pull_request: | |
jobs: | |
build: | |
name: Sphinx Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out sources | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install doxygen python3 graphviz | |
cd doc | |
python3 -m pip install pip -U | |
python3 -m pip install setuptools -U | |
python3 -m pip install -r requirements.txt | |
- name: Sphinx build | |
run: python3 -m sphinx -b html doc doc/build --keep-going | |
- name: Commit documentation changes | |
if: ${{ ! github.base_ref }} | |
run: | | |
git clone https://wintersteiger:${{ secrets.GITHUB_TOKEN }}@github.com/microsoft/merklecpp.git --branch gh-pages --single-branch gh-pages | |
mkdir -p gh-pages/${GITHUB_REF#refs/heads/} | |
cp -r doc/build/* gh-pages/${GITHUB_REF#refs/heads/} | |
cd gh-pages | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
touch .nojekyll | |
git add . | |
git commit -m "Update documentation" -a || true | |
# The above command will fail if no changes were present, so we ignore | |
# the return code. | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
if: ${{ ! github.base_ref }} | |
with: | |
branch: gh-pages | |
directory: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} |