Skip to content

Update dependency androidx.compose.material3:material3 to v1.1.2 (#541) #572

Update dependency androidx.compose.material3:material3 to v1.1.2 (#541)

Update dependency androidx.compose.material3:material3 to v1.1.2 (#541) #572

Workflow file for this run

name: Publish Docs
on:
push:
branches:
- main
# TODO: replace with on push tag https://github.com/actions/deploy-pages/issues/76
workflow_run:
workflows: [Publish Release]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'freeletics/khonshu'
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
- name: Install JDK
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 19
- name: Install Android SDK
run: ./.github/android-sdk.sh
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install MkDocs Material
run: pip install mkdocs-material
- name: Build docs
# need to set the version name because for the default committed snapshot version
# dokkaHtml tasks get skipped
run: ./gradlew dokkaHtml -PVERSION_NAME=
- name: Copy docs
run: |
# copy shared filed
cp README.md docs/index.md
cp CHANGELOG.md docs/changelog.md
# Update page title
sed -i 's/# Khonshu/# Overview/' docs/index.md
# Set current version in docs
sed -i "s/<latest-version>/$(git describe --tags --abbrev=0)/" docs/navigation/get-started.md
sed -i "s/<latest-version>/$(git describe --tags --abbrev=0)/" docs/navigation/testing.md
sed -i "s/<latest-version>/$(git describe --tags --abbrev=0)/" docs/codegen/get-started.md
sed -i "s/<latest-version>/$(git describe --tags --abbrev=0)/" docs/codegen/navigation.md
sed -i "s/<latest-version>/$(git describe --tags --abbrev=0)/" docs/helpers.md
# Copy Dokka files
mkdir -p docs/navigation/API/runtime
cp -R navigation/build/dokka/html/. docs/navigation/API/runtime
mkdir -p docs/navigation/API/runtime-compose
cp -R navigation-compose/build/dokka/html/. docs/navigation/API/compose/
mkdir -p docs/navigation/API/runtime-fragment
cp -R navigation-fragment/build/dokka/html/. docs/navigation/API/fragment/
mkdir -p docs/navigation/API/testing
cp -R navigation-testing/build/dokka/html/. docs/navigation/API/testing/
mkdir -p docs/helpers/API/state-machine
cp -R state-machine/build/dokka/html/. docs/helpers/API/state-machine/
mkdir -p docs/helpers/API/state-machine-testing
cp -R state-machine-testing/build/dokka/html/. docs/helpers/API/state-machine-testing/
mkdir -p docs/helpers/API/text-resource
cp -R text-resource/build/dokka/html/. docs/helpers/API/text-resource/
mkdir -p docs/codegen/API/runtime
cp -R codegen/build/dokka/html/. docs/codegen/API/runtime/
mkdir -p docs/codegen/API/compose
cp -R codegen-compose/build/dokka/html/. docs/codegen/API/compose/
mkdir -p docs/codegen/API/fragment
cp -R codegen-fragment/build/dokka/html/. docs/codegen/API/fragment/
mkdir -p docs/codegen/API/scope
cp -R codegen-scope/build/dokka/html/. docs/codegen/API/scope/
- name: Build MkDocs
run: mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2