66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: Release API docs
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./orx
|
|
|
|
jobs:
|
|
release_apidocs:
|
|
if: github.repository == 'openrndr/orx'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout current repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: ./orx
|
|
fetch-depth: 0
|
|
|
|
- name: Checkout OPENRNDR repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
repository: openrndr/openrndr
|
|
path: ./openrndr
|
|
ref: master
|
|
|
|
- name: Test glxinfo
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y mesa-utils xvfb
|
|
xvfb-run glxinfo
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
- name: Build OPENRNDR
|
|
working-directory: ./openrndr
|
|
run: ./gradlew publishToMavenLocal snapshot
|
|
|
|
- name: Build apidocs
|
|
run: ./gradlew :dokkaGenerate -Dorg.gradle.jvmargs=-Xmx1536M
|
|
|
|
- name: Publish to gh-pages
|
|
run: |
|
|
git worktree add --detach docs-temp
|
|
cd docs-temp
|
|
git checkout --orphan gh-pages
|
|
git reset HEAD -- .
|
|
git clean -df
|
|
mv ../build/dokka/html/* .
|
|
cp ../dokka/styles/* styles/
|
|
echo orx.openrndr.org > CNAME
|
|
git status
|
|
git config --global user.email "actions@openrndr.org"
|
|
git config --global user.name "OPENRNDR Actions"
|
|
git add .
|
|
git commit -m "Add automatically generated API docs"
|
|
git push origin gh-pages --force
|