Add meta and source fields to JSONAPIErrorItem #13456
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 | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Fetch all history for applying timestamps to every page | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Upgrade Python packaging tools | |
run: pip install --disable-pip-version-check --upgrade pip setuptools wheel | |
- name: Install tox | |
run: pip install tox | |
- name: set SPHINX_VERSION | |
run: | | |
tox -edocs --notest | |
echo "SPHINX_VERSION=$(.tox/docs/bin/python -c "import importlib.metadata;print(importlib.metadata.version('sphinx'))")" >> $GITHUB_ENV | |
- name: Cache sphinx | |
uses: actions/cache@v3 | |
with: | |
path: docs/.sphinx | |
key: sphinx-${{ env.SPHINX_VERSION }}-${{ hashFiles('.generator/schemas/**/openapi.yaml') }} | |
restore-keys: sphinx-${{ env.SPHINX_VERSION }} | |
- name: Build documentation | |
run: tox -e docs | |
- name: Compress site | |
run: tar czf site.tar.gz site | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: site.tar.gz | |
publish: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: documentation | |
path: site | |
- name: Uncompress site | |
run: tar xzf site/site.tar.gz && rm site/site.tar.gz | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site | |
commit_message: ${{ github.event.head_commit.message }} | |
# Write .nojekyll at the root, see: | |
# https://help.github.com/en/github/working-with-github-pages/about-github-pages#static-site-generators | |
enable_jekyll: false | |
# Only deploy if there were changes | |
allow_empty_commit: false |