diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 330d7a8..a6fe87b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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". @@ -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 @@ -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: diff --git a/README.md b/README.md index 6b44ae3..7ce6bb1 100644 --- a/README.md +++ b/README.md @@ -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:** , +with guides and an API reference generated from the docstrings. + You get: - **`main.py`** — a worked example that calculates displacement from diff --git a/mkdocs.yml b/mkdocs.yml index 4fde3f9..3945643 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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/