Skip to content

Add status badge for documentation (#872) #1370

Add status badge for documentation (#872)

Add status badge for documentation (#872) #1370

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Deploy
on:
push:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
release-check:
runs-on: ubuntu-20.04
continue-on-error: ${{ startsWith(github.event.ref,'refs/heads/') }}
steps:
- uses: actions/checkout@v3
- name: fetch all tags # need annotated tags for release checklist
run: |
git fetch --force --tags --depth=1
- name: For a dry run, don't verify tags and documentation
if: ${{ ! startsWith(github.event.ref, 'refs/tags/') }}
run: |
echo "EXTRA_CHECKLIST_ARGS=--no-verify-tags --no-verify-docs-next-version" >> $GITHUB_ENV
- name: Run release_checklist
run: |
admin/release_checklist $EXTRA_CHECKLIST_ARGS 6.0+master
deploy:
runs-on: ubuntu-20.04
needs: release-check
env:
FORCE_COLOR: "1"
PYTHON_VERSION: "3.8"
CC: "gcc-8"
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('noxfile.py', 'doc/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install build commands and GCC
run: |
sudo apt update
sudo apt-get install -y \
make \
ninja-build \
$CC \
$(echo $CC | sed -e 's/gcc/g\+\+/')
sudo apt-get clean
- name: Install libxml2
run: |
sudo apt-get install -y libxml2-utils
sudo apt-get clean
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install nox
- name: Lint files
run: |
nox --non-interactive --session lint
- name: Test with pytest
run: |
nox --non-interactive --session "tests_compiler($CC)"
- name: Generate documentation
run: |
nox --non-interactive --session doc
- name: Test bundle of app
run: |
nox --non-interactive --session bundle_app
- name: Build wheel
run: |
nox --non-interactive --session build_wheel
- name: Check wheel
run: |
nox --non-interactive --session check_wheel
- name: Upload distribution
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/**
- name: Publish
if: ${{ success() && startsWith(github.event.ref,'refs/tags/') }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m nox --session upload_wheel