forked from recloudstream/cloudstream
Update generate_dokka.yml
This commit is contained in:
parent
6b011ac0ad
commit
ec97feabad
1 changed files with 18 additions and 8 deletions
26
.github/workflows/generate_dokka.yml
vendored
26
.github/workflows/generate_dokka.yml
vendored
|
@ -18,6 +18,13 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate access token
|
||||||
|
id: generate_token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.GH_APP_ID }}
|
||||||
|
private_key: ${{ secrets.GH_APP_KEY }}
|
||||||
|
repository: "recloudstream/dokka"
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
|
@ -26,11 +33,15 @@ jobs:
|
||||||
- name: Checkout dokka
|
- name: Checkout dokka
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
ref: "dokka"
|
repository: "recloudstream/dokka"
|
||||||
path: "dokka"
|
path: "dokka"
|
||||||
|
token: ${{ steps.generate_token.outputs.token }}
|
||||||
|
|
||||||
- name: Clean old builds
|
- name: Clean old builds
|
||||||
run: rm -rf $GITHUB_WORKSPACE/dokka/html/*
|
run: |
|
||||||
|
shopt -s extglob
|
||||||
|
cd $GITHUB_WORKSPACE/dokka/
|
||||||
|
rm -rf !(.git)
|
||||||
|
|
||||||
- name: Setup JDK 11
|
- name: Setup JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
|
@ -42,20 +53,19 @@ jobs:
|
||||||
|
|
||||||
- name: Generate Dokka
|
- name: Generate Dokka
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd $GITHUB_WORKSPACE/src/
|
||||||
chmod +x gradlew
|
chmod +x gradlew
|
||||||
./gradlew app:dokkaHtml
|
./gradlew app:dokkaHtml
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Copy Dokka
|
- name: Copy Dokka
|
||||||
run: |
|
run: |
|
||||||
cp -r src/app/build/dokka/html $GITHUB_WORKSPACE/dokka/
|
cp -r $GITHUB_WORKSPACE/src/app/build/dokka/html/* $GITHUB_WORKSPACE/dokka/
|
||||||
|
|
||||||
- name: Push builds
|
- name: Push builds
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE/dokka
|
cd $GITHUB_WORKSPACE/dokka
|
||||||
git config --local user.email "actions@github.com"
|
git config --local user.email "110591699+recloudstream@users.noreply.github.com"
|
||||||
git config --local user.name "GitHub Actions"
|
git config --local user.name "recloudstream"
|
||||||
git add .
|
git add .
|
||||||
git commit --amend -m "Generate dokka for $GITHUB_SHA" || exit 0 # do not error if nothing to commit
|
git commit --amend -m "Generate dokka for recloudstream/cloudstream@${GITHUB_SHA}" || exit 0 # do not error if nothing to commit
|
||||||
git push --force
|
git push --force
|
||||||
|
|
Loading…
Reference in a new issue