Skip to content

v2.0.0-beta.1 Release (#161) #16

v2.0.0-beta.1 Release (#161)

v2.0.0-beta.1 Release (#161) #16

Workflow file for this run

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 }}