-
Notifications
You must be signed in to change notification settings - Fork 18
49 lines (47 loc) · 1.44 KB
/
sdk-reference.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: sdk-reference
on:
push:
branches:
- v2.0.0-beta
pull_request:
jobs:
docs:
runs-on: ubuntu-latest
environment:
name: sdk-reference
url: ${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@v3
- name: Setup Java 8
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "corretto"
cache: gradle
- uses: burrunan/gradle-cache-action@v1
name: Build SDK refernece
with:
arguments: dokkaHtml
gradle-version: wrapper
properties: |
kotlin.js.compiler=ir
kotlin.parallel.tasks.in.project=true
- name: Set env BRANCH
run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)" >> $GITHUB_ENV
- name: Set env CLOUDFLARE_BRANCH
run: |
if [[ $BRANCH == 'v2.0.0-beta' && $GITHUB_EVENT_NAME == 'push' ]]; then
echo "CLOUDFLARE_BRANCH=main" >> "$GITHUB_ENV"
else
echo "CLOUDFLARE_BRANCH=$BRANCH" >> "$GITHUB_ENV"
fi
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: deploy
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: nylas-java-sdk-reference
directory: build/dokka/html
wranglerVersion: "3"
branch: ${{ env.CLOUDFLARE_BRANCH }}