Skip to content

Generate Docs πŸ“„ #5

Generate Docs πŸ“„

Generate Docs πŸ“„ #5

Workflow file for this run

name: Generate Docs πŸ“„
on:
workflow_dispatch:
inputs:
stable:
description: 'Current App Stable Version'
required: true
default: 'v5.0.2'
pre_release:
description: 'Current App Pre-Release Version'
required: true
default: 'v5.0.3-beta'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Make gradlew executable
run: chmod +x gradlew
- name: Decode google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.APP_GOOGLE_JSON }}
run: echo $GOOGLE_SERVICES_JSON > ./bitapp/google-services.json
- name: Creating Local.Properties
env:
FIREBASE_WEB_CLIENT_ID: ${{ secrets.FIREBASE_WEB_CLIENT_ID }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
echo "firebaseWebClient=${FIREBASE_WEB_CLIENT_ID}" >> ./local.properties
echo "apiKey=${GEMINI_API_KEY}" >> ./local.properties
- name: Generate Dokka docs
run: ./gradlew dokkaHtmlMultiModule
- name: Upload Kt docs
uses: actions/upload-artifact@v2
with:
name: kt-docs
path: build/dokka
retention-days: 1
- name: Uploading mk-docs
uses: actions/upload-artifact@v2
with:
name: mk-docs
path: mk-docs
retention-days: 1
setting-up:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download docs
uses: actions/download-artifact@v3
with:
name: kt-docs
- name: Download MkDocs
uses: actions/download-artifact@v3
with:
name: mk-docs
- name: Copy docs
run: |
ls -la
mkdir -p copyDoc/generated
cp mkdocs.yml copyDoc/generated
mkdir -p copyDoc/generated/docs
cp -r docs/* copyDoc/generated/docs
ls -la copyDoc/generated/docs
mkdir -p copyDoc/generated/docs/app
cp -r htmlMultiModule/* copyDoc/generated/docs/app
ls -la copyDoc/generated/docs/app
- name: Upload docs
uses: actions/upload-artifact@v2
with:
name: generated-docs
path: copyDoc
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: setting-up
permissions: write-all
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Download docs
uses: actions/download-artifact@v3
with:
name: generated-docs
- run: |
cd generated
pip install mkdocs-material
pip install mkdocs-glightbox
pip install mkdocs-markdownextradata-plugin
- run: |
cd generated
mkdocs gh-deploy --force