Improve Kotlin support (#384) #90
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: Update Pages | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: | |
- main | |
paths: | |
- 'manual/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- uses: gradle/actions/setup-gradle@v4 | |
- uses: actions/checkout@v4 | |
with: | |
ref: pages | |
path: pages | |
- name: Create base directory | |
run: mkdir -p pages/docs/${{ github.ref_name }} | |
- name: Update AsciiDoc | |
run: | | |
./gradlew asciidoc | |
rm -rf pages/docs/${{ github.ref_name }}/manual | |
mv manual/build/docs/asciidoc pages/docs/${{ github.ref_name }}/manual | |
- name: Update JavaDoc | |
run: | | |
./gradlew javadoc | |
rm -rf pages/docs/${{ github.ref_name }}/javadoc | |
mkdir pages/docs/${{ github.ref_name }}/javadoc | |
mv modules/core/build/docs/javadoc pages/docs/${{ github.ref_name }}/javadoc/core | |
mv modules/retrofit/build/docs/javadoc pages/docs/${{ github.ref_name }}/javadoc/retrofit | |
mv modules/selenium/build/docs/javadoc pages/docs/${{ github.ref_name }}/javadoc/selenium | |
- name: Update "latest" Alias | |
if: github.ref_type == 'tag' | |
run: | | |
rm -f docs/latest | |
ln -s ./${{ github.ref_name }} docs/latest | |
working-directory: pages | |
- name: Push changes | |
run: | | |
git config user.name "Documentor" | |
git config user.email "[email protected]" | |
git add docs | |
git commit -m "Update docs for ${{ github.ref_name }}" -m "[skip ci]" | |
git push | |
working-directory: pages |