Skip to content

Commit c6512d8

Browse files
committed
Added publish and mkdocs deploy pipelines
Added dummy test
1 parent ad4f37e commit c6512d8

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy MkDocs Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Triggers deployment on push to the main branch
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
- name: Set up Python 3.11
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.11
21+
- name: Install Documentation Dependencies
22+
run: |
23+
pip install --upgrade pip
24+
pip install .[docu]
25+
- name: Deploy docs
26+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
CONFIG_FILE: mkdocs.yml

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Build and Publish Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
env:
19+
UV_SYSTEM_PYTHON: true
20+
21+
jobs:
22+
deploy:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python 3.11
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: 3.11
30+
- name: Install uv
31+
run: |
32+
curl -LsSf https://astral.sh/uv/install.sh | sh
33+
- name: Install dependencies
34+
run: |
35+
pip install --upgrade pip
36+
uv pip install build
37+
- name: Build package
38+
run: python -m build
39+
- name: Publish package to PyPI
40+
uses: pypa/gh-action-pypi-publish@release/v1
41+
with:
42+
user: __token__
43+
password: ${{ secrets.PYPI_API_TOKEN }}

tests/test_dummy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
def test_dummy():
3+
assert True

0 commit comments

Comments
 (0)