-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (41 loc) · 1.37 KB
/
docs-branch.yml
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
name: Docs Branch
on:
push:
branches: [ '**' ]
paths:
- 'dokka/**'
- 'src/main/**'
- '.github/workflows/docs-branch.yml'
concurrency:
group: pages-${{ github.ref_name }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
cache: gradle
- name: Build docs
run: ./gradlew --no-daemon dokkaHtml dokkaJavadoc
- name: Copy javadoc subfolder
run: mv build/dokka/javadoc build/dokka/html/
- uses: actions/upload-pages-artifact@v1
with:
path: 'build/dokka/html'
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: build/dokka/html
branch: ${{ github.ref_name }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}