Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement automatic HTML generation #41

Merged
merged 22 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9a5d04f
👷 Implement automatic building + deployment of GitHub Pages
bruxisma Feb 28, 2024
f01a878
💚 Fix missing `--with` for poetry dependency group
bruxisma Feb 28, 2024
0fe216d
🚚 Perform some slight build suggestions to be more uniform with the b…
bruxisma Feb 29, 2024
8b6a08b
✏️ Fix a few typos and suggestions
bruxisma Feb 29, 2024
0a48e56
⬆️ Upgrade minimum sphinx version to 6.2
bruxisma Feb 29, 2024
3fb4c18
🔒️ Update poetry.lock versioning
bruxisma Feb 29, 2024
086e6bc
💚 Fix incorrect `--directory` for `tar`
bruxisma Mar 2, 2024
1e55e89
Merge branch 'master' into bruxisma/autodocs
bruxisma Mar 17, 2024
608ecee
🔥 Remove spellcheck.yml per feedback
bruxisma Mar 17, 2024
1a5745a
♻️ Change Makefile to use poetry + work on windows (with the exceptio…
bruxisma Mar 17, 2024
a3cf6be
🐛 Fix readme.md vs README.md
bruxisma Mar 18, 2024
ad9922b
🔨 Slight changes to build targets + execution
bruxisma Mar 19, 2024
6a6792d
📄 Update Makefile error message
bruxisma Mar 19, 2024
10bde4e
🙈 Update .gitignore
bruxisma Mar 19, 2024
1cc8539
🙈 Update .gitignore
bruxisma Mar 19, 2024
061166f
🔧 Update pyproject.toml
bruxisma Mar 19, 2024
f48af8b
👷 Properly enable the cache with `python-version: '3.x'`
bruxisma Mar 19, 2024
6d899a5
Clean up
mwoehlke Mar 19, 2024
d992f0d
👷 Reuse make for more docs workflow operations.
bruxisma Mar 19, 2024
347178b
🛠 Update Makefile
bruxisma Mar 19, 2024
daa807a
Slightly simplify Makefile
mwoehlke Mar 19, 2024
3aadb7c
🔨 Simplify Makefile further :P
bruxisma Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Docs
on:
pull_request:
types: [synchronize, edited, opened]
push:
branches: [main]
bruxisma marked this conversation as resolved.
Show resolved Hide resolved
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v5
with:
cache: poetry
mwoehlke marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Environment
run: poetry install --with=docs
- name: Build Documentation
run: >-
poetry run sphinx-build
--color
-b html
${{github.workspace}}
${{github.workspace}}/_site
mwoehlke marked this conversation as resolved.
Show resolved Hide resolved
- name: Archive Documentation
run: >-
tar
--create
--gzip
--verbose
--mode=a+rw
--file=cps-docs.tar.gz
--directory=${{_site
bruxisma marked this conversation as resolved.
Show resolved Hide resolved
.
- name: Upload Archive
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: github-pages
path: ${{github.workspace}}/cps-docs.tar.gz
deploy:
if: github.event.repository.default_branch == github.ref_name
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url}}
bruxisma marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment
15 changes: 15 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Spellcheck
on:
pull_request:
types: [synchronize, edited, opened]
push:
branches: [main]
jobs:
spellcheck:
name: Spellcheck
bruxisma marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Spellcheck
uses: crate-ci/typos@master
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
copyright = u'2023, Matthew Woehlke'

release = '.'.join(map(str, [0, 9, 0]))
version = re.match('\\d+\.\\d+', release).group(0)
version = re.match(r'\d+\.\d+', release).group(0)
bruxisma marked this conversation as resolved.
Show resolved Hide resolved

language = 'en'
primary_domain = 'cps'
Expand Down
File renamed without changes.
File renamed without changes.
474 changes: 474 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "cps"
version = "0.dev"
description = ""
authors = ["The CPS Project <@>"]
mwoehlke marked this conversation as resolved.
Show resolved Hide resolved
readme = "README.md"
mwoehlke marked this conversation as resolved.
Show resolved Hide resolved
packages = [
{ include = "cps.py", from = "extensions" },
{ include = "autosectionlabel.py", from = "extensions" }
]

[tool.poetry.dependencies]
python = "^3.10"
mwoehlke marked this conversation as resolved.
Show resolved Hide resolved

[tool.poetry.group.docs.dependencies]
python = "^3.10"
sphinx = ">=7.2.6"
bruxisma marked this conversation as resolved.
Show resolved Hide resolved

[tool.poetry.plugins."sphinx.builders"]
cps = "cps"
autosectionlabel = "autosectionlabel"

[tool.typos]
files.extend-exclude = ["*.css", "*.svg"]
bruxisma marked this conversation as resolved.
Show resolved Hide resolved