Skip to content

STY/CFG: add black-jupyter and update the exclusion rules #47

STY/CFG: add black-jupyter and update the exclusion rules

STY/CFG: add black-jupyter and update the exclusion rules #47

Workflow file for this run

name: Continuous Testing and Docs Publication
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
run-linter:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.8.6"]
steps:
- name: Checkout this repository
uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run pre-commit hooks
run: |
python -m pip install pre-commit
pre-commit run --all
build-and-deploy-docs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.8"]
env:
ACCOUNT_ID: ${{ secrets.DEMO_ACCOUNT_ID }}
AUTH_TOKEN: ${{ secrets.DEMO_AUTH_TOKEN }}
MATERIALS_PROJECT_API_KEY: ${{ secrets.MATERIALS_PROJECT_API_KEY }}
steps:
- name: Checkout this repository
uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -l {0}
run: |
set -euo pipefail
pip install --no-deps -r requirements.txt
pip install --no-deps -e .
pip install -r requirements-dev.txt
pip install --upgrade numpy
pip list
- name: Build documentation
run : |
mkdocs build -d site
- uses: actions/upload-artifact@v3
with:
name: rendered-notebooks
path: site
- name: Deploy documentation to Exabyte-io.github.io
if: github.repository_owner == 'Exabyte-io' && github.ref_name == 'dev'
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: dev-with-documentation
publish_dir: ./site
destination_dir: ./docs
keep_files: true # Keep old files.
force_orphan: false # Keep git history.