mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-11-23 13:59:42 +00:00
110 lines
3.6 KiB
YAML
110 lines
3.6 KiB
YAML
name: SDK / Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Setup problem matcher
|
|
uses: xt0rted/markdownlint-problem-matcher@1a5fabfb577370cfdf5af944d418e4be3ea06f27 # v3.0.0
|
|
- name: Run markdownlint
|
|
run: npx --package markdownlint-cli markdownlint readme.md 'docs/**/*.md' --ignore node_modules
|
|
|
|
build-vitepress:
|
|
name: Build Vitepress
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Setup Node
|
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
|
with:
|
|
node-version: 16
|
|
cache: npm
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Create artifact
|
|
working-directory: ./docs/.vitepress/dist
|
|
run: zip -v -r ../vitepress.zip *
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
|
with:
|
|
name: vitepress
|
|
path: ./docs/.vitepress/vitepress.zip
|
|
|
|
build-dokka:
|
|
name: Build Dokka
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Setup Java
|
|
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
|
- name: Run dokkaHtmlMultiModule task
|
|
run: ./gradlew dokkaHtmlMultiModule
|
|
- name: Create artifact
|
|
working-directory: ./build/dokka/htmlMultiModule
|
|
run: zip -v -r ../../dokka.zip *
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
|
with:
|
|
name: dokka
|
|
path: ./build/dokka.zip
|
|
|
|
deploy:
|
|
name: Deploy
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
needs:
|
|
- build-vitepress
|
|
- build-dokka
|
|
steps:
|
|
- name: Setup GitHub Pages
|
|
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
|
|
- name: Download Vitepress artifact
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
with:
|
|
name: vitepress
|
|
path: ./build/github-pages
|
|
- name: Download Dokka artifact
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
with:
|
|
name: dokka
|
|
path: ./build/github-pages
|
|
- name: Create pages structure
|
|
working-directory: ./build/github-pages
|
|
run: |
|
|
ls -la
|
|
mkdir -p ./dist
|
|
unzip vitepress.zip -d ./dist
|
|
unzip dokka.zip -d ./dist/dokka
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
|
|
with:
|
|
path: ./build/github-pages/dist
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
|