Skip to content

Revert "[build] fix deployment of documentation" #22

Revert "[build] fix deployment of documentation"

Revert "[build] fix deployment of documentation" #22

Workflow file for this run

name: Build Master
on:
push:
branches:
- master
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: "gradle"
- name: Build
run: ./gradlew build
- name: Build documentation
run: ./gradlew dokkaHtml
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v1
with:
path: 'build/dokka/html'
- name: Deploy to Documentation GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Delete directory ./build/dokka/html/older
run: rm -Rf ./build/dokka/html/older
- name: Set VERSION from json
run: |
echo "VERSION=$(cat ./build/dokka/html/version.json | jq -r '.version')" >> "$GITHUB_ENV"
- name: Archive documentation
run: |
rm -Rf "./documentation/${{env.VERSION}}"
mv ./build/dokka/html "./documentation/${{env.VERSION}}"
rm -Rf ./documentation/*-SNAPSHOT
- name: Commit documentation
run: |
# setup the username and email
git config user.name "GitHub Actions"
git config user.email "<>"
# Stage the file, commit and push
git add documentation
git commit -m "[ci-commit] [documentation] updated documentation for ${{env.VERSION}}" || true
git push origin master