Skip to content

Commit a9d6c71

Browse files
committed
Add README and website
1 parent d3228b2 commit a9d6c71

17 files changed

+750
-1
lines changed

.github/workflows/Publish-Website.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish the mkdocs to gh-pages
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
9+
10+
jobs:
11+
deploy-website:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout the repo
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Python 3.8
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.8
22+
23+
- name: Prep mkdocs
24+
run: .github/workflows/prepare_mkdocs.sh
25+
26+
- name: Build mkdocs
27+
run: |
28+
pip3 install mkdocs-macros-plugin
29+
mkdocs build
30+
31+
- name: Deploy 🚀
32+
if: success()
33+
uses: JamesIves/github-pages-deploy-action@releases/v3
34+
with:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
BRANCH: gh-pages # The branch the action should deploy to.
37+
FOLDER: site # The folder the action should deploy.
38+
SINGLE_COMMIT: true

.github/workflows/Release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish a release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
10+
env:
11+
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
12+
13+
jobs:
14+
publish:
15+
runs-on: macOS-latest
16+
17+
steps:
18+
- name: Checkout the repo
19+
uses: actions/checkout@v2
20+
21+
- name: Validate Gradle Wrapper
22+
uses: gradle/wrapper-validation-action@v1
23+
24+
- name: Publish the macOS artifacts
25+
env:
26+
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
27+
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
28+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
29+
run: ./gradlew uploadArchives

.github/workflows/Test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '*.md'
8+
9+
env:
10+
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
11+
12+
jobs:
13+
build:
14+
runs-on: "macOS-latest"
15+
16+
steps:
17+
- name: Checkout the repo
18+
uses: actions/checkout@v2
19+
20+
- name: Validate Gradle Wrapper
21+
uses: gradle/wrapper-validation-action@v1
22+
23+
- name: Configure JDK
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: 1.8
27+
28+
- name: Test
29+
run: ./gradlew build --stacktrace
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Validate Gradle Wrapper"
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
validation:
9+
name: "Validation"
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: gradle/wrapper-validation-action@v1

.github/workflows/prepare_mkdocs.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
# The website is built using MkDocs with the Material theme.
4+
# https://squidfunk.github.io/mkdocs-material/
5+
# It requires Python to run.
6+
# Install the packages with the following command:
7+
# pip install mkdocs mkdocs-material
8+
9+
set -ex
10+
11+
# Generate the API docs
12+
./gradlew dokka
13+
14+
# Dokka filenames like `-http-url/index.md` don't work well with MkDocs <title> tags.
15+
# Assign metadata to the file's first Markdown heading.
16+
# https://www.mkdocs.org/user-guide/writing-your-docs/#meta-data
17+
title_markdown_file() {
18+
TITLE_PATTERN="s/^[#]+ *(.*)/title: \1 - tempest/"
19+
echo "---" > "$1.fixed"
20+
cat $1 | sed -E "$TITLE_PATTERN" | grep "title: " | head -n 1 >> "$1.fixed"
21+
echo "---" >> "$1.fixed"
22+
echo >> "$1.fixed"
23+
cat $1 >> "$1.fixed"
24+
mv "$1.fixed" "$1"
25+
}
26+
27+
set +x
28+
for MARKDOWN_FILE in $(find docs/0.x/ -name '*.md'); do
29+
echo $MARKDOWN_FILE
30+
title_markdown_file $MARKDOWN_FILE
31+
done
32+
set -x
33+
34+
# Copy in special files that GitHub wants in the project root.
35+
cat README.md | grep -v 'project website' > docs/index.md
36+
cp CHANGELOG.md docs/changelog.md
37+
cp CONTRIBUTING.md docs/contributing.md
38+
cp RELEASING.md docs/releasing.md

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ service/web/**/lib/
1010
docs/0.x/*
1111
docs/index.md
1212
docs/changelog.md
13-
docs/releasing.md
13+
docs/contributing.md
14+
docs/releasing.md

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
3+
## [0.1.0] - 2020-07-01
4+
5+
Initial release.

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributing
2+
3+
If you would like to contribute code to this project you can do so through GitHub by
4+
forking the repository and sending a pull request.
5+
6+
When submitting code, please make every effort to follow existing conventions
7+
and style in order to keep the code as readable as possible.
8+
9+
Before your code can be accepted into the project you must also sign the
10+
[Individual Contributor License Agreement (CLA)][1].
11+
12+
13+
[1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1

0 commit comments

Comments
 (0)