Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#
# Builds the documentation site (mkdocs + mkdocstrings) on every pull request
# so broken links or docstrings fail early, and publishes it to GitHub Pages
# on every push to main.
# on every push to main. To redeploy without a commit: Actions -> docs ->
# "Run workflow".
#
# One-time repository setup: Settings -> Pages -> Source: "GitHub Actions".

Expand All @@ -14,6 +15,8 @@ on:
branches: [main]
pull_request:
branches: [main]
# Adds a "Run workflow" button in the Actions tab for manual redeploys.
workflow_dispatch:

permissions:
contents: read
Expand All @@ -39,14 +42,14 @@ jobs:
run: uv run --group docs mkdocs build --strict

- name: Upload site for Pages
if: github.event_name == 'push'
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
name: deploy to GitHub Pages
if: github.event_name == 'push'
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ A template Python project that **teaches engineers to solve real engineering
problems in Python** — and shows that the open-source scientific stack
(`numpy`, `scipy`, and friends) can replace expensive proprietary tools.

📖 **Documentation:** <https://kovirlabs.github.io/first-principles-code/>,
with guides and an API reference generated from the docstrings.

You get:

- **`main.py`** — a worked example that calculates displacement from
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

site_name: First Principles Code
site_description: Engineering calculations in Python, written to be read and learned from.
site_url: https://kovirlabs.github.io/first-principles-code/
repo_url: https://github.com/kovirlabs/first-principles-code
edit_uri: edit/main/docs/

Expand Down
Loading