Skip to content

Commit f70e439

Browse files
authored
Merge pull request #3 from romanowski/setup-ci
Setup CI and publicaiton
2 parents cfcfb95 + ddf6067 commit f70e439

File tree

3 files changed

+54
-9
lines changed

3 files changed

+54
-9
lines changed

.github/workflows/CI.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI for context buddy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
steps:
13+
- uses: actions/checkout@v2
14+
- run: git fetch --prune --unshallow --tags
15+
16+
- name: Cache Coursier
17+
uses: actions/cache@v1
18+
with:
19+
path: ~/.cache/coursier
20+
key: sbt-coursier-cache
21+
- name: Cache SBT
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/.sbt
25+
key: sbt-${{ hashFiles('**/build.sbt') }}
26+
27+
- name: Set up JDK 11
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 11
31+
32+
- name: Compile and test
33+
run: sbt compile test
34+
35+
- name: Generate test documentation
36+
run: sbt generateExapleDocumentation
37+
38+
- name: Configure AWS Credentials
39+
uses: aws-actions/configure-aws-credentials@v1
40+
with:
41+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
42+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
43+
aws-region: eu-central-1
44+
45+
- name: Publish all
46+
run: |
47+
dest=s3://contextbuddy/dokka-dotty/$([ $GITHUB_REF = "master" ] && echo master || echo pr-$(echo $GITHUB_REF | cut '-d/' -f3))
48+
aws s3 rm $dest
49+
aws s3 sync output $dest
50+
51+

build.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ buildDokkaApi := {
3636
dokkaJavaApiJar
3737
}
3838

39+
val generateExapleDocumentation = taskKey[Unit]("Generate example documentation")
40+
generateExapleDocumentation := run.in(Compile).toTask("").value // TODO
41+
3942
unmanagedJars in Compile += dokkaJavaApiJar
4043

4144
// Uncomment to debug dokka processing (require to run debug in listen mode on 5005 port)

src/test/scala/Test1.scala

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)