Skip to content

Commit 79d0f1f

Browse files
authored
Merge branch 'master' into fix-width-breaking-points
2 parents 5404d38 + 5bb4411 commit 79d0f1f

30 files changed

+683
-282
lines changed

.github/workflows/create-release.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
publish-pypi:
14+
runs-on: ubuntu-latest
15+
name: PyPI Release
16+
environment: release
17+
permissions:
18+
id-token: write # for PyPI trusted publishing
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3"
25+
cache: pip
26+
cache-dependency-path: pyproject.toml
27+
28+
- name: Install build dependencies (pypa/build, twine)
29+
run: |
30+
pip install -U pip
31+
pip install build twine
32+
33+
- name: Build distribution
34+
run: python -m build
35+
36+
- name: Mint PyPI API token
37+
id: mint-token
38+
uses: actions/github-script@v7
39+
with:
40+
# language=JavaScript
41+
script: |
42+
// retrieve the ambient OIDC token
43+
const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
44+
const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
45+
const oidc_resp = await fetch(`${oidc_request_url}&audience=pypi`, {
46+
headers: {Authorization: `bearer ${oidc_request_token}`},
47+
});
48+
const oidc_token = (await oidc_resp.json()).value;
49+
50+
// exchange the OIDC token for an API token
51+
const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
52+
method: 'post',
53+
body: `{"token": "${oidc_token}"}` ,
54+
headers: {'Content-Type': 'application/json'},
55+
});
56+
const api_token = (await mint_resp.json()).token;
57+
58+
// mask the newly minted API token, so that we don't accidentally leak it
59+
core.setSecret(api_token)
60+
core.setOutput('api-token', api_token)
61+
62+
- name: Upload to PyPI
63+
env:
64+
TWINE_NON_INTERACTIVE: "true"
65+
TWINE_USERNAME: "__token__"
66+
TWINE_PASSWORD: "${{ steps.mint-token.outputs.api-token }}"
67+
run: |
68+
twine check dist/*
69+
twine upload dist/*
70+
71+
github-release:
72+
runs-on: ubuntu-latest
73+
name: GitHub release
74+
environment: release
75+
permissions:
76+
contents: write # for softprops/action-gh-release to create GitHub release
77+
steps:
78+
- uses: actions/checkout@v4
79+
- name: Get release version
80+
id: get_version
81+
uses: actions/github-script@v7
82+
with:
83+
script: core.setOutput('version', context.ref.replace("refs/tags/", ""))
84+
85+
- name: Create GitHub release
86+
uses: softprops/action-gh-release@v1
87+
if: startsWith(github.ref, 'refs/tags/')
88+
with:
89+
name: "Alabaster ${{ steps.get_version.outputs.version }}"
90+
body: "Changelog: https://alabaster.readthedocs.io/en/latest/changelog.html"

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Render docs
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: 3
25+
cache: pip
26+
cache-dependency-path: docs/requirements.txt
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install -r docs/requirements.txt
32+
33+
- name: Render the documentation
34+
run: >
35+
sphinx-build
36+
-M html ./docs ./build
37+
--jobs=auto
38+
-T
39+
-W
40+
--keep-going

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint source code
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
ruff:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: 3
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install "ruff==0.5.2"
30+
31+
- name: Lint with Ruff
32+
run: |
33+
ruff check . --output-format github
34+
ruff format . --check

.github/workflows/test.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
vary-sphinx:
17+
runs-on: ubuntu-latest
18+
name: Sphinx ${{ matrix.sphinx-version }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
sphinx-version:
23+
- "6.2"
24+
- "7.4"
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up Python
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: 3
31+
32+
- name: Install Sphinx
33+
run: |
34+
python -m pip install -U pip
35+
python -m pip install "sphinx~=${{ matrix.sphinx-version }}.0"
36+
python -m pip install .
37+
38+
- name: Run Sphinx
39+
run: >
40+
sphinx-build
41+
-M html ./docs ./build
42+
-j=auto
43+
-T
44+
-W
45+
--keep-going
46+
47+
vary-python:
48+
runs-on: ubuntu-latest
49+
name: Python ${{ matrix.python-version }}
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
python-version:
54+
- "3.10"
55+
- "3.11"
56+
- "3.12"
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Set up Python ${{ matrix.python-version }}
60+
uses: actions/setup-python@v4
61+
with:
62+
python-version: ${{ matrix.python-version }}
63+
64+
- name: Install Sphinx
65+
run: |
66+
python -m pip install -U pip
67+
python -m pip install -U sphinx
68+
python -m pip install .
69+
70+
- name: Run Sphinx
71+
run: >
72+
sphinx-build
73+
-M html ./docs ./build
74+
--jobs=auto
75+
-T
76+
-W
77+
--keep-going
78+
79+
oldest-supported:
80+
runs-on: ubuntu-latest
81+
name: Oldest supported
82+
83+
steps:
84+
- uses: actions/checkout@v4
85+
- name: Set up Python
86+
uses: actions/setup-python@v4
87+
with:
88+
python-version: 3
89+
90+
- name: Install Sphinx
91+
run: |
92+
python -m pip install -U pip
93+
python -m pip install "sphinx~=6.2.0"
94+
python -m pip install .
95+
96+
- name: Run Sphinx
97+
run: >
98+
sphinx-build
99+
-M html ./docs ./build
100+
-j=auto
101+
-T
102+
-W
103+
--keep-going

.readthedocs.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3"
7+
8+
python:
9+
install:
10+
- requirements: docs/requirements.txt
11+
- method: pip
12+
path: .

.ruff.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
target-version = "py310" # Pin Ruff to Python 3.10
2+
output-format = "full"
3+
4+
[lint]
5+
preview = true
6+
select = [
7+
"B", # flake8-bugbear
8+
"E", # pycodestyle
9+
"F", # pyflakes
10+
"I", # isort
11+
"W", # pycodestyle
12+
]
13+
ignore = [
14+
# "E124",
15+
# "E125",
16+
# "E128",
17+
"E261",
18+
# "E301",
19+
# "E302",
20+
# "E303",
21+
]

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

LICENSE renamed to LICENSE.rst

File renamed without changes.

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.rst

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1+
.. image:: https://img.shields.io/pypi/v/alabaster.svg
2+
:target: https://pypi.org/project/alabaster/
3+
:alt: Package on PyPI
4+
5+
.. image:: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml/badge.svg
6+
:target: https://github.com/sphinx-doc/alabaster/actions/workflows/test.yml
7+
:alt: CI Status
8+
9+
.. image:: https://readthedocs.org/projects/alabaster/badge/
10+
:target: https://alabaster.readthedocs.io/
11+
:alt: Documentation Status
12+
13+
.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
14+
:target: https://opensource.org/license/BSD-3-Clause
15+
:alt: BSD 3 Clause
16+
17+
118
What is Alabaster?
219
==================
320

421
Alabaster is a visually (c)lean, responsive, configurable theme for the `Sphinx
5-
<http://sphinx-doc.org>`_ documentation system. It is Python 2+3 compatible.
22+
<https://www.sphinx-doc.org>`_ documentation system.
23+
It requires Python 3.10 or newer and Sphinx 6.2 or newer.
624

725
It began as a third-party theme, and is still maintained separately, but as of
826
Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected
927
as the default theme.
1028

1129
Live examples of this theme can be seen on `this project's own website
12-
<http://alabaster.readthedocs.io>`_, `paramiko.org <http://paramiko.org>`_,
13-
`fabfile.org <http://fabfile.org>`_ and `pyinvoke.org <http://pyinvoke.org>`_.
14-
15-
For more documentation, please see http://alabaster.readthedocs.io.
30+
<https://alabaster.readthedocs.io/>`_, `paramiko.org <https://www.paramiko.org>`_,
31+
`fabfile.org <https://www.fabfile.org>`_ and `pyinvoke.org <https://www.pyinvoke.org>`_.
1632

17-
.. note::
18-
You can install the development version via ``pip install -e
19-
git+https://github.com/bitprophet/alabaster/#egg=alabaster``.
33+
For more documentation, please see https://alabaster.readthedocs.io/.

0 commit comments

Comments
 (0)