feat(patches): deployWithAdb #1
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: Dokka | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/generate-dokka.yml | |
- Aliucord/** | |
jobs: | |
dokka: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Generate Dokka | |
run: | | |
chmod +x ./gradlew | |
./gradlew Aliucord:dokkaHtml | |
./gradlew Aliucord:dokkaJavadoc | |
- name: Push Dokka | |
shell: bash # GLOBIGNORE is a special bash variable so explicitly target bash | |
env: | |
API_TOKEN: ${{ secrets.API_PAT_GITHUB }} | |
USERNAME: Github-Actions | |
REPO: Aliucord/dokka | |
run: | | |
git config --global user.name "$USERNAME" | |
git config --global user.email [email protected] | |
git clone https://$USERNAME:[email protected]/$REPO.git | |
cd dokka | |
GLOBIGNORE=README.md:.git # do not glob README and .git | |
rm -rf * | |
cp -r ../Aliucord/build/dokka/* . | |
git add . | |
git commit -m "Generate dokka for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" || exit 0 | |
git push https://$USERNAME:[email protected]/$REPO.git |