Skip to content

chore(deps): upgrade pypa/gh-action-pypi-publish action to v1.14.2 (#… #352

chore(deps): upgrade pypa/gh-action-pypi-publish action to v1.14.2 (#…

chore(deps): upgrade pypa/gh-action-pypi-publish action to v1.14.2 (#… #352

name: Docs JSON Export
on:
push:
branches:
- master
workflow_dispatch:
jobs:
export-docs-json:
name: Export docs.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
id: setup-python
with:
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements/docs.txt"
check-latest: true
- name: Install dependencies
id: install-deps
run: |
python -m pip install -U pip
pip install ".[docs,voice]"
pip install beautifulsoup4
- name: Build Sphinx HTML docs
id: build-sphinx
run: sphinx-build -b html docs docs/_build/html
- name: Export docs.json
id: generate-json
run: python scripts/docs_json_exporter.py
- name: Upload docs.json as artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
id: artifact-upload
with:
name: Pycord Docs JSON
path: docs.json
retention-days: 1
- name: Show docs.json summary
run: |
head -n 40 docs.json || tail -n 40 docs.json
- name: Output artifact ID
run: |
echo "artifact-id=${{ steps.artifact-upload.outputs.artifact-id }}" >> $GITHUB_OUTPUT
echo "artifact-url=${{ steps.artifact-upload.outputs.artifact-url }}" >> $GITHUB_OUTPUT
echo "::notice::Artifact uploaded: ${{ steps.artifact-upload.outputs.artifact-url }}"