mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-10-08 19:41:30 -04:00
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
name: Docs Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
- '!v*-*'
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
if: github.repository == 'meshtastic/Meshtastic-Android'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- name: Extract Version
|
|
id: version
|
|
run: |
|
|
TAG=${GITHUB_REF#refs/tags/v}
|
|
echo "version=$TAG" >> $GITHUB_OUTPUT
|
|
echo "Deploying docs for version: $TAG"
|
|
|
|
- name: Gradle Setup
|
|
uses: ./.github/actions/gradle-setup
|
|
with:
|
|
gradle_encryption_key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
|
|
|
# Build root docs site (/ on Pages)
|
|
- name: Build Root Docs Site
|
|
run: ./gradlew generateDocsBundle publishDocsSite -Pdocs.channel=root -Pci=true
|
|
|
|
# Build versioned docs (/vX.Y.Z/ on Pages)
|
|
- name: Build Versioned Docs
|
|
run: ./gradlew generateDocsBundle publishDocsSite -Pdocs.channel=release -Pdocs.version=${{ steps.version.outputs.version }} -Pci=true
|
|
|
|
# Build Dokka API reference (/api/ on Pages)
|
|
- name: Build Dokka HTML documentation
|
|
run: ./gradlew dokkaGeneratePublicationHtml --no-configuration-cache
|
|
|
|
- name: Assemble Pages artifact
|
|
run: |
|
|
# Root site is already at build/_site/ from the root channel build.
|
|
# Versioned docs are at build/_site/v{version}/ from the release channel build.
|
|
# Add Dokka at /api/
|
|
cp -r build/dokka/html build/_site/api
|
|
|
|
- name: Upload Pages Artifact
|
|
uses: actions/upload-pages-artifact@v5
|
|
with:
|
|
path: build/_site/
|
|
|
|
deploy:
|
|
if: github.repository == 'meshtastic/Meshtastic-Android'
|
|
needs: build
|
|
runs-on: ubuntu-24.04-arm
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v5
|
|
|