From a7d85cf9fdc34cfc81eac93f7abd85e43245b967 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 11 May 2022 11:00:24 +0200 Subject: [PATCH 1/4] Setup GitHub action to generate the documentation of the SDK from develop branch --- .github/workflows/docs.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..b6333c5940 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,22 @@ +name: Documentation + +on: + push: + branches: [ develop ] + +jobs: + docs: + name: Generate and publish Android Matrix SDK documentation + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Build docs + run: ./gradlew dokkaHtml + + - name: Deploy docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./matrix-sdk-android/build/dokka/html From 27dcb6ef9cbe3e121b70746049af0c1c9f9b1b55 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 11 May 2022 11:14:45 +0200 Subject: [PATCH 2/4] Add a note when generated from this project. A change will have to be done on the SDK project to remove this line before generated the documentation. --- matrix-sdk-android/docs/modules.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix-sdk-android/docs/modules.md b/matrix-sdk-android/docs/modules.md index edf5af64d0..b19bc73534 100644 --- a/matrix-sdk-android/docs/modules.md +++ b/matrix-sdk-android/docs/modules.md @@ -1,5 +1,8 @@ # Module matrix-sdk-android + +**Note**: You are viewing the nightly documentation of the Android Matrix SDK library. The documentation of the released library can be found here: [https://matrix-org.github.io/matrix-android-sdk2/](https://matrix-org.github.io/matrix-android-sdk2/) + ## Welcome to the matrix-sdk-android documentation! This pages list the complete API that this SDK is exposing to a client application. From 7f2484ca4c54ba6714f1b3bcb8f942317cd96831 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 11 May 2022 11:15:46 +0200 Subject: [PATCH 3/4] Temporary trigger the doc generation on pull request to check the workflow --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b6333c5940..a7806f6d4a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,6 +1,7 @@ name: Documentation on: + pull_request: { } push: branches: [ develop ] From 79982af8d1e22e4ad78459c4f3738d02cc0493e0 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 11 May 2022 11:15:46 +0200 Subject: [PATCH 4/4] Revert "Temporary trigger the doc generation on pull request to check the workflow" This reverts commit 7f2484ca4c54ba6714f1b3bcb8f942317cd96831. --- .github/workflows/docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a7806f6d4a..b6333c5940 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,7 +1,6 @@ name: Documentation on: - pull_request: { } push: branches: [ develop ]