-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into allow-pygments-background
- Loading branch information
Showing
30 changed files
with
682 additions
and
278 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Create release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish-pypi: | ||
runs-on: ubuntu-latest | ||
name: PyPI Release | ||
environment: release | ||
permissions: | ||
id-token: write # for PyPI trusted publishing | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3" | ||
cache: pip | ||
cache-dependency-path: pyproject.toml | ||
|
||
- name: Install build dependencies (pypa/build, twine) | ||
run: | | ||
pip install -U pip | ||
pip install build twine | ||
- name: Build distribution | ||
run: python -m build | ||
|
||
- name: Mint PyPI API token | ||
id: mint-token | ||
uses: actions/github-script@v7 | ||
with: | ||
# language=JavaScript | ||
script: | | ||
// retrieve the ambient OIDC token | ||
const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN; | ||
const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL; | ||
const oidc_resp = await fetch(`${oidc_request_url}&audience=pypi`, { | ||
headers: {Authorization: `bearer ${oidc_request_token}`}, | ||
}); | ||
const oidc_token = (await oidc_resp.json()).value; | ||
// exchange the OIDC token for an API token | ||
const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', { | ||
method: 'post', | ||
body: `{"token": "${oidc_token}"}` , | ||
headers: {'Content-Type': 'application/json'}, | ||
}); | ||
const api_token = (await mint_resp.json()).token; | ||
|
||
// mask the newly minted API token, so that we don't accidentally leak it | ||
core.setSecret(api_token) | ||
core.setOutput('api-token', api_token) | ||
|
||
- name: Upload to PyPI | ||
env: | ||
TWINE_NON_INTERACTIVE: "true" | ||
TWINE_USERNAME: "__token__" | ||
TWINE_PASSWORD: "${{ steps.mint-token.outputs.api-token }}" | ||
run: | | ||
twine check dist/* | ||
twine upload dist/* | ||
github-release: | ||
runs-on: ubuntu-latest | ||
name: GitHub release | ||
environment: release | ||
permissions: | ||
contents: write # for softprops/action-gh-release to create GitHub release | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get release version | ||
id: get_version | ||
uses: actions/github-script@v7 | ||
with: | ||
script: core.setOutput('version', context.ref.replace("refs/tags/", "")) | ||
|
||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
name: "Alabaster ${{ steps.get_version.outputs.version }}" | ||
body: "Changelog: https://alabaster.readthedocs.io/en/latest/changelog.html" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Render docs | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3 | ||
cache: pip | ||
cache-dependency-path: docs/requirements.txt | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r docs/requirements.txt | ||
- name: Render the documentation | ||
run: > | ||
sphinx-build | ||
-M html ./docs ./build | ||
--jobs=auto | ||
-T | ||
-W | ||
--keep-going |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint source code | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install "ruff==0.5.2" | ||
- name: Lint with Ruff | ||
run: | | ||
ruff check . --output-format github | ||
ruff format . --check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
vary-sphinx: | ||
runs-on: ubuntu-latest | ||
name: Sphinx ${{ matrix.sphinx-version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sphinx-version: | ||
- "6.2" | ||
- "7.4" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3 | ||
|
||
- name: Install Sphinx | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install "sphinx~=${{ matrix.sphinx-version }}.0" | ||
python -m pip install . | ||
- name: Run Sphinx | ||
run: > | ||
sphinx-build | ||
-M html ./docs ./build | ||
-j=auto | ||
-T | ||
-W | ||
--keep-going | ||
vary-python: | ||
runs-on: ubuntu-latest | ||
name: Python ${{ matrix.python-version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Sphinx | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U sphinx | ||
python -m pip install . | ||
- name: Run Sphinx | ||
run: > | ||
sphinx-build | ||
-M html ./docs ./build | ||
--jobs=auto | ||
-T | ||
-W | ||
--keep-going | ||
oldest-supported: | ||
runs-on: ubuntu-latest | ||
name: Oldest supported | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3 | ||
|
||
- name: Install Sphinx | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install "sphinx~=6.2.0" | ||
python -m pip install . | ||
- name: Run Sphinx | ||
run: > | ||
sphinx-build | ||
-M html ./docs ./build | ||
-j=auto | ||
-T | ||
-W | ||
--keep-going |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3" | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
target-version = "py310" # Pin Ruff to Python 3.10 | ||
output-format = "full" | ||
|
||
[lint] | ||
preview = true | ||
select = [ | ||
"B", # flake8-bugbear | ||
"E", # pycodestyle | ||
"F", # pyflakes | ||
"I", # isort | ||
"W", # pycodestyle | ||
] | ||
ignore = [ | ||
# "E124", | ||
# "E125", | ||
# "E128", | ||
"E261", | ||
# "E301", | ||
# "E302", | ||
# "E303", | ||
] |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,33 @@ | ||
.. image:: https://img.shields.io/pypi/v/alabaster.svg | ||
:target: https://pypi.org/project/alabaster/ | ||
:alt: Package on PyPI | ||
|
||
.. image:: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml/badge.svg | ||
:target: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml | ||
:alt: CI Status | ||
|
||
.. image:: https://readthedocs.org/projects/alabaster/badge/ | ||
:target: https://alabaster.readthedocs.io/ | ||
:alt: Documentation Status | ||
|
||
.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg | ||
:target: https://opensource.org/license/BSD-3-Clause | ||
:alt: BSD 3 Clause | ||
|
||
|
||
What is Alabaster? | ||
================== | ||
|
||
Alabaster is a visually (c)lean, responsive, configurable theme for the `Sphinx | ||
<http://sphinx-doc.org>`_ documentation system. It is Python 2+3 compatible. | ||
<https://www.sphinx-doc.org>`_ documentation system. | ||
It requires Python 3.10 or newer and Sphinx 6.2 or newer. | ||
|
||
It began as a third-party theme, and is still maintained separately, but as of | ||
Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected | ||
as the default theme. | ||
|
||
Live examples of this theme can be seen on `this project's own website | ||
<http://alabaster.readthedocs.io>`_, `paramiko.org <http://paramiko.org>`_, | ||
`fabfile.org <http://fabfile.org>`_ and `pyinvoke.org <http://pyinvoke.org>`_. | ||
|
||
For more documentation, please see http://alabaster.readthedocs.io. | ||
<https://alabaster.readthedocs.io/>`_, `paramiko.org <https://www.paramiko.org>`_, | ||
`fabfile.org <https://www.fabfile.org>`_ and `pyinvoke.org <https://www.pyinvoke.org>`_. | ||
|
||
.. note:: | ||
You can install the development version via ``pip install -e | ||
git+https://github.com/bitprophet/alabaster/#egg=alabaster``. | ||
For more documentation, please see https://alabaster.readthedocs.io/. |
Oops, something went wrong.