Skip to content

Commit 86125d2

Browse files
docs: add ci workflow to publish docs
1 parent f1bdfee commit 86125d2

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy API Documentation
2+
3+
# This workflow allows us to build the API docs using a release tag and automatically deploy it to GitHub pages.
4+
# The docs are live at https://bitcoindevkit.github.io/bdk-jvm/.
5+
6+
on: [workflow_dispatch]
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- name: "Checkout repository"
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: recursive
22+
persist-credentials: false
23+
fetch-depth: 0
24+
25+
- name: "Set up JDK"
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: temurin
29+
java-version: 17
30+
31+
- name: "Setup Gradle"
32+
uses: gradle/actions/setup-gradle@v4
33+
34+
- name: "Build library"
35+
run: bash ./scripts/build-linux-x86_64.sh
36+
37+
- name: "Build API documentation"
38+
run: ./gradlew dokkaGeneratePublicationHtml
39+
40+
- name: "Setup Pages"
41+
uses: actions/configure-pages@v5
42+
43+
- name: "Upload artifact"
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: './lib/build/dokka/html'
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-24.04
53+
needs: build
54+
steps:
55+
- name: "Deploy to GitHub Pages"
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)