Skip to content

Commit

Permalink
Docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Rey committed Nov 13, 2024
1 parent 7edb427 commit d5da56f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
branches: [ "main" ]


jobs:
Expand All @@ -19,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Deploy Docs

on:
workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # Replace with the desired Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Build the documentation
run: |
cd docs-source
make githubclean # Clean any old builds
make github # Build docs
- name: Deploy docs to the repository
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions@github.com"
# Assuming the built docs are in the /docs directory
git add docs
git commit -m "Automatic Deploy documentation"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub provides this token for auth
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,12 @@ to add they yourself using to autodoc directives (take inspiration from the file

If you want to help, check the `todos.txt` file, several todos are described there.

## GitHub Workflow

### Publishing on PyPI

The pipeline between GitHub and PyPI is automatised. To push a new version do the following:
- Update the `pyproject.toml` with the new version number.
- Update the `pabutools/__init__.py` with the new version number.
- On GitHub, create a new release tagged with the new version number (only admins can do that), on [this page](https://github.com/COMSOC-Community/pabutools/releases/new).
- You're done, the new version of the package is automatically pushed to PyPI after the creation of a GitHub release.

0 comments on commit d5da56f

Please sign in to comment.