Remove redundant property setting and replace println with logger #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Déploiement automatique de la doc Dokka et de l'exemple Compose" | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Empêche plusieurs déploiements simultanés | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# 1) Construction de la doc Dokka et de l'exemple Compose | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java (Temurin 17) | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
# Génération de la documentation Dokka | |
- name: Génération de la doc Dokka | |
run: | | |
./gradlew dokkaHtml | |
# Construction de l’exemple Kotlin/Compose | |
- name: Construction de l’exemple Kotlin/Compose | |
run: | | |
./gradlew :sample:composeApp:wasmJsBrowserDistribution | |
# Préparer une arborescence commune pour le déploiement | |
# On place la doc à la racine et l’exemple dans /sample | |
- name: Préparation des fichiers pour le déploiement | |
run: | | |
mkdir -p build/final | |
# On copie la doc dans build/final (racine du site) | |
cp -r mediaplayer/build/dokka/html/* build/final | |
# On crée le dossier /sample dans build/final | |
mkdir -p build/final/sample | |
cp -r sample/composeApp/build/dist/wasmJs/productionExecutable/* build/final/sample | |
# Upload vers l’artefact "pages" pour qu’il soit disponible au job suivant | |
- name: Upload artifact pour GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/final | |
# 2) Déploiement GitHub Pages | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
# L’URL finale sera mise dans la sortie page_url | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Déploiement sur GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
with: | |
path: build/final |