Version 1.0.2 #179
Workflow file for this run
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: docs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- name: Checkout github repo | ||
uses: actions/checkout@v4 | ||
- name: Install pandoc | ||
run: sudo apt-get install pandoc | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: pip upgrade | ||
run: | | ||
pip install --upgrade pip | ||
pip install wheel setuptools pip --upgrade | ||
- name: Install Dependencies | ||
run: | | ||
pip install -e . | ||
pip install -e ".[dev]" | ||
- name: build docs | ||
shell: bash -l {0} | ||
run: | | ||
cd docs | ||
poetry run make html | ||
if [ $? = 2 ]; then exit 1;fi | ||
cd build/html | ||
touch .nojekyll | ||
- name: Commit documentation changes | ||
run: | | ||
git clone https://github.com/LSSTDESC/BlendingToolKit.git --branch gh-pages --single-branch gh-pages | ||
cp -r docs/build/html/* gh-pages/docs/ | ||
cd gh-pages/docs | ||
touch .nojekyll | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "Update documentation" -a || true | ||
# The above command will fail if no changes were present, so we ignore that. | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: gh-pages | ||
directory: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |