Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 7fe7d9d

Browse files
committed
Add setup for building and publishing docs
1 parent cd59809 commit 7fe7d9d

File tree

8 files changed

+90
-11
lines changed

8 files changed

+90
-11
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.idea
22
.vscode
3-
**/__pycache__/
3+
**/__pycache__/
4+
/docs/project/project/
5+
/docs/project/target/
6+
/docs/target/

.travis.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
11
language: python
2+
23
python:
34
- "3.8"
4-
install:
5-
- pip install -r requirements.txt
6-
script: pytest
7-
deploy:
8-
provider: pypi
9-
username: "__token__"
10-
password:
11-
secure: "wHyj8a0t6Ub4BmJYSwDQO5wJphX3Wz55bDAlWrb4KaJGD4XzjFs5VWDqgZRAJ6JSM8WF9xQqVPxniXRpyBO41VDNGkyT5ytf0yohnw6kud/xwm8+y5BbJ1ZxmGmpxoJumc1R/tJNABlabLEvSr10OtuMnR7kW5d4WCBR/baugr8sCEXnNLDdxNOnCZhC36cm+yWRIi8ih8eUhkbJRLb/KQO1PDrHEf7V35PwLktSkhWkjr0mtSvbthPPn6hmH2PV+OnMD102oYbDO2eGWr8nhHAPcfXaDQgdBy9WQ20SgZqNmZc6LIwNV6MWdCV/BSk4sLithT/r5aZcL99fzxy+PFmJdbxJibPEqJyf8DVSQa9Pa2ndjNXnHJuqeEh4Xdcp90z1aRGEr988P/llFFnq8pDXCapAvdGeALh3IdANhTYJcQtZfcJ0D/aAnq0le8X5i4X39aPazbR4VPXDoDiFCPqxy5MJ2Y3skqX9dyXsKuqUMlfpfUsEnhW5RbnSCA53BYw9FoykLA9tvFtjnxywwHo1iFfDdhXU0z7L/bE5dlafct1WST6cnDHaqew8ew03OE3Z2DTBiV/aNDON2JvqgnqT4JW3T3xDUYR7pKbzEnVGq8oGS9nmxLU4ciXad7dRtrwb92Wv2Jbs4wkeLFCmoDhshtT7KEDANTxBS4tAk50="
12-
on:
13-
tags: true
5+
6+
jobs:
7+
include:
8+
9+
- stage: build
10+
install:
11+
- pip install -r requirements.txt
12+
script: pytest
13+
deploy:
14+
provider: pypi
15+
username: "__token__"
16+
password:
17+
secure: "wHyj8a0t6Ub4BmJYSwDQO5wJphX3Wz55bDAlWrb4KaJGD4XzjFs5VWDqgZRAJ6JSM8WF9xQqVPxniXRpyBO41VDNGkyT5ytf0yohnw6kud/xwm8+y5BbJ1ZxmGmpxoJumc1R/tJNABlabLEvSr10OtuMnR7kW5d4WCBR/baugr8sCEXnNLDdxNOnCZhC36cm+yWRIi8ih8eUhkbJRLb/KQO1PDrHEf7V35PwLktSkhWkjr0mtSvbthPPn6hmH2PV+OnMD102oYbDO2eGWr8nhHAPcfXaDQgdBy9WQ20SgZqNmZc6LIwNV6MWdCV/BSk4sLithT/r5aZcL99fzxy+PFmJdbxJibPEqJyf8DVSQa9Pa2ndjNXnHJuqeEh4Xdcp90z1aRGEr988P/llFFnq8pDXCapAvdGeALh3IdANhTYJcQtZfcJ0D/aAnq0le8X5i4X39aPazbR4VPXDoDiFCPqxy5MJ2Y3skqX9dyXsKuqUMlfpfUsEnhW5RbnSCA53BYw9FoykLA9tvFtjnxywwHo1iFfDdhXU0z7L/bE5dlafct1WST6cnDHaqew8ew03OE3Z2DTBiV/aNDON2JvqgnqT4JW3T3xDUYR7pKbzEnVGq8oGS9nmxLU4ciXad7dRtrwb92Wv2Jbs4wkeLFCmoDhshtT7KEDANTxBS4tAk50="
18+
on:
19+
tags: true
20+
21+
- stage: deploy docs
22+
name: deploy release docs to cloudstate.io
23+
if: tag =~ ^v
24+
language: scala
25+
script: cd docs && sbt deploy
26+
- stage: deploy docs
27+
name: deploy snapshot docs to cloudstate.io
28+
if: branch = master AND type = push
29+
language: scala
30+
script: cd docs && sbt deploy
31+
32+
env:
33+
global:
34+
# encrypted with: travis encrypt --pro -r cloudstateio/python-support DEPLOY_DOCS_TOKEN=<token>
35+
secure: "lALDa5xUg8uUAoxmn1XxwycRa+xp1IcohMuk+1i+GKI7BX60SI8ueHo+FZU3H+PF53CjtxA1UefsAFwz8smtWiePWbqalbLVMx7N2bt7tLjA/lhQC2+vEZu3LPMYGkxE/XwQ5Zr9KLgoci33USu3R6mxBgg3EbcVSSkOyBhGgH2VMIxktPf5Ae64khlhKJtkBlPgktuKytR6bESFMtdQ2v+wXQm0gQgTq85OhMc0hyixSO3JIshfEXd9Ywkfjj7j1njba/yb19tVeKh9GZh+PFLFp84CJwPE2R0ZoWGYMACsRwUQNmLaFb9y+GjTryanYlzbz8FGOVeL3INw7cDJriLopSYGEssiNGSZQh2U8+01N79VohzzBR+XSx/uw8Gly7C51rI7wFs0VbkUtPGFSbAcDGK6OqQ2fFsL1qwYIU+uLWpt2dtcxtbRsDpE3GL//8jUGLE6r6ov0b0W262PNbrmCaFdm9JzhjaypjvjMNBebmi4ezm8RS22lRT5wykJOzuifBTubgsSx7K2TIuTQrGv7zTOjnWoaSUy8nLiAuFp/WmCRQEaAZ9LXzLigzrnI+LtwPDnwvNP5xF+jmRnGxk27pFipDKmZZW/IXFR0uij14U7ewIFAWWtl/g2Fyi47JMXMLwR1IdBJ3QBZBlP+EX4SUvwg8YR1qUGRQbxXDs="

docs/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Cloudstate Python documentation
2+
3+
Documentation source for Cloudstate Python, published to https://cloudstate.io/docs/python/current/
4+
5+
To build the docs with [sbt](https://www.scala-sbt.org):
6+
7+
```
8+
sbt paradox
9+
```
10+
11+
Can also first start the sbt interactive shell with `sbt`, then run commands.
12+
13+
The documentation can be viewed locally by opening the generated pages:
14+
15+
```
16+
open target/paradox/site/main/index.html
17+
```
18+
19+
To watch files for changes and rebuild docs automatically:
20+
21+
```
22+
sbt ~paradox
23+
```

docs/build.sbt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
lazy val docs = project
2+
.in(file("."))
3+
.enablePlugins(CloudstateParadoxPlugin)
4+
.settings(
5+
deployModule := "python",
6+
paradoxProperties in Compile ++= Map(
7+
"cloudstate.python.version" -> { if (isSnapshot.value) previousStableVersion.value.getOrElse("0.0.0") else version.value },
8+
"extref.cloudstate.base_url" -> "https://cloudstate.io/docs/core/current/%s"
9+
)
10+
)

docs/project/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version=1.3.12

docs/project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")
2+
addSbtPlugin("io.cloudstate" % "sbt-cloudstate-paradox" % "0.1.2")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Getting started
2+
3+
Install current version:
4+
5+
@@@vars
6+
```
7+
pip install cloudstate==$cloudstate.python.version$
8+
```
9+
@@@
10+
11+
Link to @extref:[event sourcing](cloudstate:user/features/eventsourced.html)

docs/src/main/paradox/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Cloudstate Python
2+
3+
Link to @extref:[core docs](cloudstate:index.html)
4+
5+
@@@ index
6+
* [Getting started](gettingstarted.md)
7+
@@@

0 commit comments

Comments
 (0)