Skip to content

Updated the plotting #33

Updated the plotting

Updated the plotting #33

name: Documentation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-deploy:
name: Build Documentation and Push
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
# https://github.com/marketplace/actions/checkout
- name: Start actions
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[docs]
- name: Make Docs
shell: bash -l {0}
run: |
cd docs/
make html
cd -
# Great extra actions to compose with:
# Create an artifact of the html output.
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: DocumentationHTML
path: docs/build/html/
- name: Commit documentation changes
shell: bash -l {0}
run: |
git clone https://github.com/lsawade/obsplotlib.git --branch gh-pages --single-branch gh-pages
rm -rf gh-pages/*
cp -r docs/build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
# Push the changes
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}