docs: add a VitePress documentation site published to GitHub Pages - #143
Merged
Conversation
The project had no user documentation. `docs/` holds generated PHP class stubs and internal audit notes, not something a user can read. Add `website/`, a VitePress site with 24 pages, written from the `*.stub.php` files and the C sources rather than from the upstream DataStax docs. Every default in the `Cluster\Builder` reference comes from `php_scylladb_cluster_builder_new` in `src/Cluster/BuilderHandlers.c`. Structure: - Getting started: introduction, installation, quick start. - Connecting: clusters and sessions, authentication, TLS, load balancing and routing, connection pool and timeouts, retry policies. - Working with data: queries, results and paging, data types, collections and user defined types, batches, asynchronous queries, schema metadata. - Operating: error handling, performance, metrics and logging, troubleshooting. - Reference: eight API pages. `ignoreDeadLinks` is `false`, so a broken internal link fails the build. Also add `.github/workflows/docs.yml`. It builds on every pull request that touches `website/`, and deploys `trunk` to GitHub Pages. The repository needs Settings, Pages, Source set to GitHub Actions before the deploy step works. The repository root ignores `config.*` for the autotools build, which also matched `website/.vitepress/config.mts`. `website/.gitignore` negates that.
|
Tick the box to add this pull request to the merge queue (same as
|
The organization requires every action to be pinned to a full-length commit SHA. The unpinned tags made the Build job fail before it started.
actions/upload-pages-artifact is a composite action that calls an unpinned actions/upload-artifact@v4. The org policy checks nested actions, so the job failed at set-up. Do the same work directly: tar the built site into artifact.tar and upload it under the name 'github-pages', which is what actions/deploy-pages expects. actions/upload-artifact is already pinned elsewhere in this repository.
… deploy The archive step was gated on trunk, so a mistake in it could only surface after the merge. Run it on every pull request and keep only the upload gated. Also stop cancelling an in-flight run on trunk. A cancelled deploy leaves the Pages API mid-request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
website/, a VitePress documentation site (24 pages), plus a workflow that publishes it to GitHub Pages at https://he4rt.github.io/scylladb-php-driver/.The project had no user documentation.
docs/holds generated PHP class stubs and internal audit notes, so it stays untouched.Contents
Cluster\Builder, cluster and session, statements, rows and futures, value classes, type factory, constants, exceptionsHow it was written
Content comes from the
*.stub.phpfiles and the C sources, not from the upstream DataStax documentation. Specifically:Cluster\Builderreference table comes fromphp_scylladb_cluster_builder_new(src/Cluster/BuilderHandlers.c).src/Database/ResultDecoder.cand the bind switch insrc/DefaultSession.c.src/ExecutionOptions.c.Cassandra_DefaultSession::metrics.src/Exception/exceptions.stub.php.CI
.github/workflows/docs.ymlbuilds on every pull request that toucheswebsite/, and deploystrunkto Pages.ignoreDeadLinksisfalse, so a broken internal link fails the build.Reviewer notes
Action required before the deploy step works: set Settings → Pages → Build and deployment → Source to GitHub Actions.
The repository root
.gitignorehasconfig.*for the autotools build, which also matchedwebsite/.vitepress/config.mts.website/.gitignorenegates it. Worth a look, since it silently drops anyconfig.*file added anywhere in the tree.Two source issues found while reading the code for this. Both are documented as the intended behavior, and separate fixes are in progress:
withConnectionHeartbeatInterval()andwithTCPKeepalive()convert seconds to milliseconds throughphp_scylladb_set_timeout(), butcass_cluster_set_connection_heartbeat_intervalandcass_cluster_set_tcp_keepalivetake seconds.withConnectionHeartbeatInterval(30.0)currently yields 30000 seconds. The constructor defaults are raw seconds, which confirms seconds is the intent. The docs describe these as seconds, so they are correct only once the fix lands.php_scylladb_cluster_builder_propertiesexposespasswordin clear text, sovar_dump($builder)prints it. The docs carry a warning about this, which can be removed once it is redacted.One broken script, left out of the docs:
scripts/run-scylladb-ssl.shrunsdocker compose -f ./docker/docker-compose.ssl.yml, and that file does not exist.Local development