Further updates #17
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
# Build documentation and publish on github pages | ||
on: | ||
push: | ||
branches: [ master ] | ||
permissions: | ||
contents: write | ||
jobs: | ||
doc: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
with: bash -el {0} | ||
Check failure on line 26 in .github/workflows/docs.yml
|
||
run: | | ||
conda install -c conda-forge graphviz==2.47.2 | ||
conda info | ||
conda list | ||
python -m pip install --upgrade pip | ||
pip install .[docs] | ||
which dot | ||
- name: Build HTML docs | ||
id: linkcheck | ||
with: bash -el {0} | ||
run: | | ||
make -C docs html linkcheck 2>&1 | tee check.log | ||
echo "::set-output name=broken::$(grep '(line\s*[0-9]*)\(\s\)broken\(\s\)' check.log)" | ||
echo "::set-output name=ok::$(grep 'build succeed' check.log)" | ||
env: | ||
SPHINXOPTS: -nW --keep-going | ||
- name: Show docs build check results | ||
with: bash -el {0} | ||
run: | | ||
if [ -z "${{ steps.linkcheck.outputs.ok }}" ]; then | ||
echo "Build was not successful!" | ||
exit 1 | ||
fi | ||
if [ -z "${{ steps.linkcheck.outputs.broken }}" ]; then | ||
echo "No broken links found." | ||
exit 0 | ||
else | ||
echo "Broken links found:" | ||
echo "${{ steps.linkcheck.outputs.broken }}" | ||
exit 1 | ||
fi | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
# Deply the documentation built only on the push even | ||
if: ${{ (github.event_name != 'pull_request') && (github.repository == 'zhubonan/aiida-atoms') }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build/html |