feat: guild join requests #5038
This file contains hidden or 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: "Documentation Checks" | |
| on: | |
| push: | |
| paths: | |
| - "discord/**" | |
| - "docs/**" | |
| - "requirements/**" | |
| - ".github/workflows/docs-checks.yml" | |
| - ".readthedocs.yml" | |
| - "LICENSE" | |
| - "MANIFEST.in" | |
| - "README.rst" | |
| - "*.toml" | |
| - "*.py" | |
| branches: [ master ] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| with_linkcheck: | |
| type: boolean | |
| description: "Whether to run the linkcheck" | |
| default: true | |
| schedule: | |
| - cron: "0 0 * * *" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| docs: ${{ steps.filter.outputs.docs }} | |
| steps: | |
| - name: "Check changed paths" | |
| id: filter | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | |
| with: | |
| script: | | |
| if (context.eventName !== 'pull_request') { | |
| core.setOutput('docs', 'true'); | |
| return; | |
| } | |
| const files = await github.paginate(github.rest.pulls.listFiles, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| }); | |
| const matches = (file) => ( | |
| file.startsWith('discord/') || | |
| file.startsWith('docs/') || | |
| file.startsWith('requirements/') || | |
| file === '.github/workflows/docs-checks.yml' || | |
| file === '.readthedocs.yml' || | |
| file === 'LICENSE' || | |
| file === 'MANIFEST.in' || | |
| file === 'README.rst' || | |
| (!file.includes('/') && file.endsWith('.toml')) || | |
| (!file.includes('/') && file.endsWith('.py')) | |
| ); | |
| const changed = files.some((file) => matches(file.filename)); | |
| core.setOutput('docs', changed ? 'true' : 'false'); | |
| if (!changed) { | |
| core.notice('Documentation checks skipped because no changed files matched the documentation check paths.'); | |
| await core.summary | |
| .addHeading('Documentation checks skipped', 2) | |
| .addRaw('No changed files matched the documentation check paths.') | |
| .write(); | |
| } | |
| docs: | |
| needs: [ changes ] | |
| if: ${{ needs.changes.outputs.docs == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout Repository" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: "Setup Python" | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.14" | |
| cache: "pip" | |
| cache-dependency-path: "requirements/docs.txt" | |
| check-latest: true | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -U pip | |
| pip install ".[docs,voice]" | |
| - name: "Check Links" | |
| if: ${{ github.event_name == 'schedule' || inputs.with_linkcheck }} | |
| run: | | |
| cd docs | |
| make linkcheck | |
| - name: "Compile to html" | |
| run: | | |
| cd docs | |
| make -e SPHINXOPTS="-D language='en'" html |