cloudstream/.github/workflows/generate_dokka.yml

61 lines
1.4 KiB
YAML
Raw Normal View History

2022-08-13 14:12:41 +00:00
name: Dokka
2022-08-13 14:09:08 +00:00
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
concurrency:
2022-08-13 14:13:30 +00:00
group: "dokka"
2022-08-13 14:09:08 +00:00
cancel-in-progress: true
on:
push:
branches:
# choose your default branch
- master
- main
paths-ignore:
- '*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
path: "src"
- name: Checkout dokka
uses: actions/checkout@master
with:
ref: "dokka"
path: "dokka"
- name: Clean old builds
2022-08-13 14:14:35 +00:00
run: rm -rf $GITHUB_WORKSPACE/dokka/html/*
2022-08-13 14:09:08 +00:00
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Generate Dokka
run: |
cd src
2022-08-13 14:12:41 +00:00
chmod +x gradlew
./gradlew app:dokkaHtml
2022-08-13 14:09:08 +00:00
- name: Copy Dokka
run: |
cp -r dokka/html $GITHUB_WORKSPACE/dokka/
- name: Push builds
run: |
cd $GITHUB_WORKSPACE/dokka
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit --amend -m "Generate dokka for $GITHUB_SHA" || exit 0 # do not error if nothing to commit
2022-08-13 14:12:41 +00:00
git push --force