Skip to content

Commit d6cd3d2

Browse files
docs gh-pages
docs gh-pages
1 parent 8ce6196 commit d6cd3d2

File tree

5 files changed

+63
-35
lines changed

5 files changed

+63
-35
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@ jobs:
77
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@master
11-
- name: Set up Python 3.9
12-
uses: actions/setup-python@v1
13-
with:
14-
python-version: 3.9
15-
- name: Install pypa/build
16-
run: >-
17-
python -m
18-
pip install
19-
build
20-
--user
21-
- name: Build a binary wheel and a source tarball
22-
run: >-
23-
python -m
24-
build
25-
--sdist
26-
--wheel
27-
--outdir dist/
28-
.
29-
- name: Publish distribution 📦 to Test PyPI
30-
uses: pypa/gh-action-pypi-publish@master
31-
with:
32-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
33-
repository_url: https://test.pypi.org/legacy/
34-
skip_existing: true
35-
- name: Publish distribution 📦 to PyPI
36-
if: startsWith(github.ref, 'refs/tags')
37-
uses: pypa/gh-action-pypi-publish@master
38-
with:
39-
password: ${{ secrets.PYPI_API_TOKEN }}
10+
- uses: actions/checkout@master
11+
- name: Set up Python 3.9
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.9
15+
- name: Install pypa/build
16+
run: >-
17+
python -m
18+
pip install
19+
build
20+
--user
21+
- name: Build a binary wheel and a source tarball
22+
run: >-
23+
python -m
24+
build
25+
--sdist
26+
--wheel
27+
--outdir dist/
28+
.
29+
- name: Publish distribution 📦 to Test PyPI
30+
uses: pypa/gh-action-pypi-publish@master
31+
with:
32+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
33+
repository_url: https://test.pypi.org/legacy/
34+
skip_existing: true
35+
- name: Publish distribution 📦 to PyPI
36+
if: startsWith(github.ref, 'refs/tags')
37+
uses: pypa/gh-action-pypi-publish@master
38+
with:
39+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ name: Run Pytest
44
on:
55
# Triggers the workflow on push or pull request events but only for the master branch
66
push:
7-
branches: [ master ]
7+
branches: [master]
88
pull_request:
9-
branches: [ master ]
9+
branches: [master]
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:

.github/workflows/sphinx.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/setup-python@v2
11+
- uses: actions/checkout@master
12+
with:
13+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install furo
18+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
19+
- name: Build and Commit
20+
uses: sphinx-notes/pages@v2
21+
- name: Push changes
22+
uses: ad-m/github-push-action@master
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
branch: gh-pages

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
sys.path.insert(0, os.path.abspath('..'))
1616

1717
import pyregexp
18-
1918
# -- Project information -----------------------------------------------------
2019

2120
project = 'pyregexp'
@@ -32,6 +31,7 @@
3231
'sphinx.ext.autodoc',
3332
'sphinx.ext.napoleon',
3433
'sphinx.ext.viewcode',
34+
'sphinx.ext.githubpages',
3535
]
3636

3737
# Add any paths that contain templates here, relative to this directory.
@@ -48,9 +48,9 @@
4848
# The theme to use for HTML and HTML Help pages. See the documentation for
4949
# a list of builtin themes.
5050
#
51-
html_theme = 'alabaster'
51+
html_theme = 'furo'
5252

5353
# Add any paths that contain custom static files (such as style sheets) here,
5454
# relative to this directory. They are copied after the builtin static files,
5555
# so a file named "default.css" will overwrite the builtin "default.css".
56-
html_static_path = ['_static']
56+
html_static_path = ['_static']

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ astroid==2.9.3
33
attrs==20.3.0
44
autopep8==1.6.0
55
Babel==2.9.1
6+
beautifulsoup4==4.10.0
67
certifi==2021.10.8
78
charset-normalizer==2.0.12
89
coverage==5.5
910
docutils==0.17.1
11+
furo==2022.3.4
1012
idna==3.3
1113
imagesize==1.3.0
1214
importlib-metadata==4.11.3
@@ -29,6 +31,7 @@ pytz==2022.1
2931
requests==2.27.1
3032
rope==0.19.0
3133
snowballstemmer==2.2.0
34+
soupsieve==2.3.1
3235
Sphinx==4.4.0
3336
sphinxcontrib-applehelp==1.0.2
3437
sphinxcontrib-devhelp==1.0.2

0 commit comments

Comments
 (0)